diff --git a/tests/Unit/MetadataResolver/CienResolverTest.php b/tests/Unit/MetadataResolver/CienResolverTest.php index 2395dc0..f9cbe77 100644 --- a/tests/Unit/MetadataResolver/CienResolverTest.php +++ b/tests/Unit/MetadataResolver/CienResolverTest.php @@ -20,7 +20,7 @@ class CienResolverTest extends TestCase public function test() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Cien/test.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Cien/test.html'); $this->createResolver(CienResolver::class, $responseText); @@ -37,7 +37,7 @@ class CienResolverTest extends TestCase public function testWithNoTimestamp() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Cien/testWithNoTimestamp.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Cien/testWithNoTimestamp.html'); $this->createResolver(CienResolver::class, $responseText); $this->expectException(\RuntimeException::class); diff --git a/tests/Unit/MetadataResolver/DLsiteResolverTest.php b/tests/Unit/MetadataResolver/DLsiteResolverTest.php index c698e07..21e0cbe 100644 --- a/tests/Unit/MetadataResolver/DLsiteResolverTest.php +++ b/tests/Unit/MetadataResolver/DLsiteResolverTest.php @@ -20,7 +20,7 @@ class DLsiteResolverTest extends TestCase public function testHome() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -36,7 +36,7 @@ class DLsiteResolverTest extends TestCase public function testSoft() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testSoft.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testSoft.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -52,7 +52,7 @@ class DLsiteResolverTest extends TestCase public function testComic() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testComic.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testComic.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -68,7 +68,7 @@ class DLsiteResolverTest extends TestCase public function testManiax() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testManiax.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testManiax.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -84,7 +84,7 @@ class DLsiteResolverTest extends TestCase public function testPro() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testPro.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testPro.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -100,7 +100,7 @@ class DLsiteResolverTest extends TestCase public function testBooks() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testBooks.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testBooks.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -116,7 +116,7 @@ class DLsiteResolverTest extends TestCase public function testGirls() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testGirls.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testGirls.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -132,7 +132,7 @@ class DLsiteResolverTest extends TestCase public function testGirlsPro() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testGirlsPro.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testGirlsPro.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -148,7 +148,7 @@ class DLsiteResolverTest extends TestCase public function testBL() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testBL.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testBL.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -164,7 +164,7 @@ class DLsiteResolverTest extends TestCase public function testEng() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testEng.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testEng.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -180,7 +180,7 @@ class DLsiteResolverTest extends TestCase public function testEcchiEng() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testEcchiEng.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testEcchiEng.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -196,7 +196,7 @@ class DLsiteResolverTest extends TestCase public function testSPLink() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); // SP版(touch)のURLのテストだがリゾルバ側でURLから-touchを削除してPC版を取得するので、PC版の内容を使用する $this->createResolver(DLsiteResolver::class, $responseText); @@ -213,7 +213,7 @@ class DLsiteResolverTest extends TestCase public function testShortLink() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -229,7 +229,7 @@ class DLsiteResolverTest extends TestCase public function testOldAffiliateLink() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -245,7 +245,7 @@ class DLsiteResolverTest extends TestCase public function testSnsAffiliateLink() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -261,7 +261,7 @@ class DLsiteResolverTest extends TestCase public function testAffiliateLink() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -277,7 +277,7 @@ class DLsiteResolverTest extends TestCase public function testAffiliateUrl() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -303,7 +303,7 @@ class DLsiteResolverTest extends TestCase public function testHTMLdescription() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHTMLdescription.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHTMLdescription.html'); $this->createResolver(DLsiteResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/DeviantArtResolverTest.php b/tests/Unit/MetadataResolver/DeviantArtResolverTest.php index d85f6c5..8a2168a 100644 --- a/tests/Unit/MetadataResolver/DeviantArtResolverTest.php +++ b/tests/Unit/MetadataResolver/DeviantArtResolverTest.php @@ -20,7 +20,7 @@ class DeviantArtResolverTest extends TestCase public function testMature() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/DeviantArt/mature.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DeviantArt/mature.json'); $this->createResolver(DeviantArtResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php b/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php index 1056f85..347d189 100644 --- a/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php +++ b/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php @@ -20,7 +20,7 @@ class FC2ContentsResolverTest extends TestCase public function testAdult() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/FC2Contents/adult.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/FC2Contents/adult.html'); $this->createResolver(FC2ContentsResolver::class, $responseText); @@ -35,7 +35,7 @@ class FC2ContentsResolverTest extends TestCase public function testGeneral() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/FC2Contents/general.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/FC2Contents/general.html'); $this->createResolver(FC2ContentsResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/FantiaResolverTest.php b/tests/Unit/MetadataResolver/FantiaResolverTest.php index d607821..cdf6c7f 100644 --- a/tests/Unit/MetadataResolver/FantiaResolverTest.php +++ b/tests/Unit/MetadataResolver/FantiaResolverTest.php @@ -20,7 +20,7 @@ class FantiaResolverTest extends TestCase public function test() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Fantia/test.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Fantia/test.json'); $this->createResolver(FantiaResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/FanzaResolverTest.php b/tests/Unit/MetadataResolver/FanzaResolverTest.php index 9271676..1a65370 100644 --- a/tests/Unit/MetadataResolver/FanzaResolverTest.php +++ b/tests/Unit/MetadataResolver/FanzaResolverTest.php @@ -23,7 +23,7 @@ class FanzaResolverTest extends TestCase */ public function test($filename, $url, $title, $description, $image, $tags) { - $responseText = file_get_contents(__DIR__ . "/../../fixture/Fanza/{$filename}"); + $responseText = $this->fetchSnapshot(__DIR__ . "/../../fixture/Fanza/{$filename}"); $this->createResolver(FanzaResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php b/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php index 31873a1..e96c730 100644 --- a/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php +++ b/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php @@ -20,7 +20,7 @@ class HentaiFoundryResolverTest extends TestCase public function test() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/HentaiFoundry/illust.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/HentaiFoundry/illust.html'); $this->createResolver(HentaiFoundryResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/IwaraResolverTest.php b/tests/Unit/MetadataResolver/IwaraResolverTest.php index f065bb5..dd6a053 100644 --- a/tests/Unit/MetadataResolver/IwaraResolverTest.php +++ b/tests/Unit/MetadataResolver/IwaraResolverTest.php @@ -20,7 +20,7 @@ class IwaraResolverTest extends TestCase public function testVideo() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Iwara/video.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Iwara/video.html'); $this->createResolver(IwaraResolver::class, $responseText); @@ -37,7 +37,7 @@ class IwaraResolverTest extends TestCase public function testYouTube() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Iwara/youtube.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Iwara/youtube.html'); $this->createResolver(IwaraResolver::class, $responseText); @@ -54,7 +54,7 @@ class IwaraResolverTest extends TestCase public function testImages() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Iwara/images.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Iwara/images.html'); $this->createResolver(IwaraResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php b/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php index cd6127c..1c9ddfe 100644 --- a/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php +++ b/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php @@ -20,7 +20,7 @@ class Kb10uyShortStoryServerResolverTest extends TestCase public function testNormalPost() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Kb10uyShortStoryServer/tomone.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Kb10uyShortStoryServer/tomone.html'); $this->createResolver(Kb10uyShortStoryServerResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/KomifloResolverTest.php b/tests/Unit/MetadataResolver/KomifloResolverTest.php index 2850b9a..6318f91 100644 --- a/tests/Unit/MetadataResolver/KomifloResolverTest.php +++ b/tests/Unit/MetadataResolver/KomifloResolverTest.php @@ -20,7 +20,7 @@ class KomifloResolverTest extends TestCase public function testComic() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Komiflo/comic.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Komiflo/comic.json'); $this->createResolver(KomifloResolver::class, $responseText); @@ -36,7 +36,7 @@ class KomifloResolverTest extends TestCase public function testComicWithNoParents() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Komiflo/comicWithNoParents.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Komiflo/comicWithNoParents.json'); $this->createResolver(KomifloResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php b/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php index 6df319b..f3abc9c 100644 --- a/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php +++ b/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php @@ -21,7 +21,7 @@ class NicoSeigaResolverTest extends TestCase public function testSeiga() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/NicoSeiga/seiga.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/NicoSeiga/seiga.html'); $this->createResolver(NicoSeigaResolver::class, $responseText); @@ -37,7 +37,7 @@ class NicoSeigaResolverTest extends TestCase public function testShunga() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/NicoSeiga/shunga.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/NicoSeiga/shunga.html'); $this->createResolver(NicoSeigaResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/NijieResolverTest.php b/tests/Unit/MetadataResolver/NijieResolverTest.php index 72ab264..c8d56da 100644 --- a/tests/Unit/MetadataResolver/NijieResolverTest.php +++ b/tests/Unit/MetadataResolver/NijieResolverTest.php @@ -20,7 +20,7 @@ class NijieResolverTest extends TestCase public function testStandardPicture() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -36,7 +36,7 @@ class NijieResolverTest extends TestCase public function testMultiplePicture() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -52,7 +52,7 @@ class NijieResolverTest extends TestCase public function testAnimationGif() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -68,7 +68,7 @@ class NijieResolverTest extends TestCase public function testMp4Movie() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -84,7 +84,7 @@ class NijieResolverTest extends TestCase public function testViewPopup() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -100,7 +100,7 @@ class NijieResolverTest extends TestCase public function testSp() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -116,7 +116,7 @@ class NijieResolverTest extends TestCase public function testSpViewPopup() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); $this->createResolver(NijieResolver::class, $responseText); @@ -132,7 +132,7 @@ class NijieResolverTest extends TestCase public function testHasHtmlInAuthorProfile() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testHasHtmlInAuthorProfileResponse.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testHasHtmlInAuthorProfileResponse.html'); $this->createResolver(NijieResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/PixivResolverTest.php b/tests/Unit/MetadataResolver/PixivResolverTest.php index fb6278b..25395eb 100644 --- a/tests/Unit/MetadataResolver/PixivResolverTest.php +++ b/tests/Unit/MetadataResolver/PixivResolverTest.php @@ -20,7 +20,7 @@ class PixivResolverTest extends TestCase public function testIllust() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illust.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -36,7 +36,7 @@ class PixivResolverTest extends TestCase public function testIllustMultiPages() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illustMultiPages.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illustMultiPages.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -52,7 +52,7 @@ class PixivResolverTest extends TestCase public function testManga() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/manga.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/manga.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -68,7 +68,7 @@ class PixivResolverTest extends TestCase public function testArtworkUrl() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illust.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -84,7 +84,7 @@ class PixivResolverTest extends TestCase public function testArtworkUrlEn() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illust.json'); $this->createResolver(PixivResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/PlurkResolverTest.php b/tests/Unit/MetadataResolver/PlurkResolverTest.php index 8597db7..cded328 100644 --- a/tests/Unit/MetadataResolver/PlurkResolverTest.php +++ b/tests/Unit/MetadataResolver/PlurkResolverTest.php @@ -20,7 +20,7 @@ class PlurkResolverTest extends TestCase public function test() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Plurk/test.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Plurk/test.html'); $this->createResolver(PlurkResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/SteamResolverTest.php b/tests/Unit/MetadataResolver/SteamResolverTest.php index 2590357..16e17ba 100644 --- a/tests/Unit/MetadataResolver/SteamResolverTest.php +++ b/tests/Unit/MetadataResolver/SteamResolverTest.php @@ -20,7 +20,7 @@ class SteamResolverTest extends TestCase public function test() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Steam/test.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Steam/test.json'); $this->createResolver(SteamResolver::class, $responseText); @@ -32,7 +32,7 @@ class SteamResolverTest extends TestCase public function testR18() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Steam/testR18.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Steam/testR18.json'); $this->createResolver(SteamResolver::class, $responseText); @@ -46,7 +46,7 @@ class SteamResolverTest extends TestCase { $this->expectException(\RuntimeException::class); - $responseText = file_get_contents(__DIR__ . '/../../fixture/Steam/testNotFound.json'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Steam/testNotFound.json'); $this->createResolver(SteamResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/ToranoanaResolverTest.php b/tests/Unit/MetadataResolver/ToranoanaResolverTest.php index ccb5d2b..3ae01cc 100644 --- a/tests/Unit/MetadataResolver/ToranoanaResolverTest.php +++ b/tests/Unit/MetadataResolver/ToranoanaResolverTest.php @@ -20,7 +20,7 @@ class ToranoanaResolverTest extends TestCase public function testTora() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testTora.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testTora.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -35,7 +35,7 @@ class ToranoanaResolverTest extends TestCase public function testToraR() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testToraR.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testToraR.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -50,7 +50,7 @@ class ToranoanaResolverTest extends TestCase public function testToraD() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testToraD.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testToraD.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -65,7 +65,7 @@ class ToranoanaResolverTest extends TestCase public function testToraRD() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testToraRD.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testToraRD.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -80,7 +80,7 @@ class ToranoanaResolverTest extends TestCase public function testJoshi() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshi.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshi.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -95,7 +95,7 @@ class ToranoanaResolverTest extends TestCase public function testJoshiR() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshiR.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshiR.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -110,7 +110,7 @@ class ToranoanaResolverTest extends TestCase public function testJoshiD() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshiD.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshiD.html'); $this->createResolver(ToranoanaResolver::class, $responseText); @@ -125,7 +125,7 @@ class ToranoanaResolverTest extends TestCase public function testJoshiRD() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshiRD.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshiRD.html'); $this->createResolver(ToranoanaResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/XtubeResolverTest.php b/tests/Unit/MetadataResolver/XtubeResolverTest.php index 94c95d8..061f595 100644 --- a/tests/Unit/MetadataResolver/XtubeResolverTest.php +++ b/tests/Unit/MetadataResolver/XtubeResolverTest.php @@ -20,7 +20,7 @@ class XtubeResolverTest extends TestCase public function test() { - $responseText = file_get_contents(__DIR__ . '/../../fixture/Xtube/video.html'); + $responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Xtube/video.html'); $this->createResolver(XtubeResolver::class, $responseText);