テストをユニークにする
ついでにテスト名とfixtureファイル名を同一にする
This commit is contained in:
@@ -196,8 +196,7 @@ class DLsiteResolverTest extends TestCase
|
||||
|
||||
public function testSPLink()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||
// SP版(touch)のURLのテストだがリゾルバ側でURLから-touchを削除してPC版を取得するので、PC版の内容を使用する
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testSPLink.html');
|
||||
|
||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||
|
||||
@@ -213,7 +212,7 @@ class DLsiteResolverTest extends TestCase
|
||||
|
||||
public function testShortLink()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testShortLink.html');
|
||||
|
||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||
|
||||
|
@@ -20,7 +20,7 @@ class NijieResolverTest extends TestCase
|
||||
|
||||
public function testStandardPicture()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPicture.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 = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePicture.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 = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGif.html');
|
||||
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
@@ -67,7 +67,7 @@ class NijieResolverTest extends TestCase
|
||||
|
||||
public function testMp4Movie()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4Movie.html');
|
||||
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
@@ -82,7 +82,7 @@ class NijieResolverTest extends TestCase
|
||||
|
||||
public function testStandardPictureSp()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureSp.html');
|
||||
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
@@ -98,7 +98,7 @@ class NijieResolverTest extends TestCase
|
||||
|
||||
public function testMultiplePictureSp()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureSp.html');
|
||||
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
@@ -114,7 +114,7 @@ class NijieResolverTest extends TestCase
|
||||
|
||||
public function testAnimationGifSp()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifSp.html');
|
||||
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
@@ -130,7 +130,7 @@ class NijieResolverTest extends TestCase
|
||||
|
||||
public function testMp4MovieSp()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieSp.html');
|
||||
|
||||
$this->createResolver(NijieResolver::class, $responseText);
|
||||
|
||||
|
@@ -20,7 +20,7 @@ class PixivResolverTest extends TestCase
|
||||
|
||||
public function testIllust()
|
||||
{
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
||||
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/testIllust.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 = file_get_contents(__DIR__ . '/../../fixture/Pixiv/testIllustMultiPages.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 = file_get_contents(__DIR__ . '/../../fixture/Pixiv/testManga.json');
|
||||
|
||||
$this->createResolver(PixivResolver::class, $responseText);
|
||||
|
||||
|
@@ -28,6 +28,9 @@ class SteamResolverTest extends TestCase
|
||||
$this->assertEquals('NEKOPARA Vol. 1', $metadata->title);
|
||||
$this->assertEquals('水無月嘉祥(みなづき かしょう)は伝統ある老舗和菓子屋である実家を出て、 パティシエとして自身のケーキ屋『ラ・ソレイユ』を一人で開店する。 しかし実家から送った引っ越し荷物の中に、 実家で飼っていた人型ネコのショコラとバニラが紛れ込んでいた。', $metadata->description);
|
||||
$this->assertStringStartsWith('https://steamcdn-a.akamaihd.net/steam/apps/333600/header.jpg?t=', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://store.steampowered.com/api/appdetails/?l=japanese&appids=333600', (string) $this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testR18()
|
||||
@@ -40,6 +43,9 @@ class SteamResolverTest extends TestCase
|
||||
$this->assertEquals('Broke Girl | 負債千金', $metadata->title);
|
||||
$this->assertEquals('苦労知らずに育ったお嬢様は一夜にして1000万の借金を背負うことになった。借金を返済するために働かなければならない。しかし世間には悪意が満ちており、男達はお金で彼女を誘うか凌辱することしか考えていない。', $metadata->description);
|
||||
$this->assertStringStartsWith('https://steamcdn-a.akamaihd.net/steam/apps/1077580/header.jpg?t=', $metadata->image);
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://store.steampowered.com/api/appdetails/?l=japanese&appids=1077580', (string) $this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
|
||||
public function testNotFound()
|
||||
@@ -51,5 +57,8 @@ class SteamResolverTest extends TestCase
|
||||
$this->createResolver(SteamResolver::class, $responseText);
|
||||
|
||||
$this->resolver->resolve('https://store.steampowered.com/app/1');
|
||||
if ($this->shouldUseMock()) {
|
||||
$this->assertSame('https://store.steampowered.com/api/appdetails/?l=japanese&appids=1', (string) $this->handler->getLastRequest()->getUri());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user