diff --git a/tests/Unit/MetadataResolver/NijieResolverTest.php b/tests/Unit/MetadataResolver/NijieResolverTest.php index 0bc35534..ed60af1d 100644 --- a/tests/Unit/MetadataResolver/NijieResolverTest.php +++ b/tests/Unit/MetadataResolver/NijieResolverTest.php @@ -56,13 +56,13 @@ public function testAnimationGif() $this->createResolver(NijieResolver::class, $responseText); - $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=9537'); - $this->assertSame('ニジエがgifに対応したんだってね 奥さん', $metadata->title); - $this->assertSame('投稿者: 黒末アプコ' . PHP_EOL . 'アニメgifとか専門外なのでよくわかりませんでした', $metadata->description); + $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=393134'); + $this->assertSame('MANKALOさん', $metadata->title); + $this->assertStringStartsWith('投稿者: sb' . PHP_EOL . 'すけぶの。服の着脱機能を勝手に付けさせて頂きました。', $metadata->description); $this->assertStringStartsWith('https://nijie.info/pic/logo/nijie_logo_og.png', $metadata->image); - $this->assertSame(['アニメgif'], $metadata->tags); + $this->assertSame(['ロリ', '中出し', '騎乗位', '獣耳', 'GIFアニメ', 'ドット絵'], $metadata->tags); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=9537', (string) $this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=393134', (string) $this->handler->getLastRequest()->getUri()); } } diff --git a/tests/Unit/MetadataResolver/PixivResolverTest.php b/tests/Unit/MetadataResolver/PixivResolverTest.php index d35be579..bbcd5865 100644 --- a/tests/Unit/MetadataResolver/PixivResolverTest.php +++ b/tests/Unit/MetadataResolver/PixivResolverTest.php @@ -28,7 +28,7 @@ public function testIllust() $this->assertEquals('coffee break', $metadata->title); $this->assertStringStartsWith('投稿者: 裕', $metadata->description); $this->assertEquals('https://i.pixiv.cat/img-master/img/2018/04/12/00/01/28/68188073_p0_master1200.jpg', $metadata->image); - $this->assertEquals(['オリジナル', 'カフェ', '眼鏡', 'イヤホン', 'ぱっつん', '艶ぼくろ', '眼鏡っ娘', 'オリジナル5000users入り', 'マニキュア'], $metadata->tags); + $this->assertEquals(['オリジナル', 'カフェ', '眼鏡', 'イヤホン', 'ぱっつん', '艶ぼくろ', '眼鏡っ娘', 'オリジナル5000users入り', 'マニキュア', '赤セーター'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.pixiv.net/ajax/illust/68188073', (string) $this->handler->getLastRequest()->getUri()); } @@ -76,7 +76,7 @@ public function testArtworkUrl() $this->assertEquals('coffee break', $metadata->title); $this->assertStringStartsWith('投稿者: 裕', $metadata->description); $this->assertEquals('https://i.pixiv.cat/img-master/img/2018/04/12/00/01/28/68188073_p0_master1200.jpg', $metadata->image); - $this->assertEquals(['オリジナル', 'カフェ', '眼鏡', 'イヤホン', 'ぱっつん', '艶ぼくろ', '眼鏡っ娘', 'オリジナル5000users入り', 'マニキュア'], $metadata->tags); + $this->assertEquals(['オリジナル', 'カフェ', '眼鏡', 'イヤホン', 'ぱっつん', '艶ぼくろ', '眼鏡っ娘', 'オリジナル5000users入り', 'マニキュア', '赤セーター'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.pixiv.net/ajax/illust/68188073', (string) $this->handler->getLastRequest()->getUri()); } @@ -92,7 +92,7 @@ public function testArtworkUrlEn() $this->assertEquals('coffee break', $metadata->title); $this->assertStringStartsWith('投稿者: 裕', $metadata->description); $this->assertEquals('https://i.pixiv.cat/img-master/img/2018/04/12/00/01/28/68188073_p0_master1200.jpg', $metadata->image); - $this->assertEquals(['オリジナル', 'カフェ', '眼鏡', 'イヤホン', 'ぱっつん', '艶ぼくろ', '眼鏡っ娘', 'オリジナル5000users入り', 'マニキュア'], $metadata->tags); + $this->assertEquals(['オリジナル', 'カフェ', '眼鏡', 'イヤホン', 'ぱっつん', '艶ぼくろ', '眼鏡っ娘', 'オリジナル5000users入り', 'マニキュア', '赤セーター'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.pixiv.net/ajax/illust/68188073', (string) $this->handler->getLastRequest()->getUri()); } diff --git a/tests/Unit/MetadataResolver/SteamResolverTest.php b/tests/Unit/MetadataResolver/SteamResolverTest.php index 16e17ba7..8736211e 100644 --- a/tests/Unit/MetadataResolver/SteamResolverTest.php +++ b/tests/Unit/MetadataResolver/SteamResolverTest.php @@ -27,7 +27,7 @@ public function test() $metadata = $this->resolver->resolve('https://store.steampowered.com/app/333600'); $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); + $this->assertStringStartsWith('https://cdn.akamai.steamstatic.com/steam/apps/333600/header.jpg?t=', $metadata->image); } public function testR18() @@ -39,7 +39,7 @@ public function testR18() $metadata = $this->resolver->resolve('https://store.steampowered.com/app/1077580'); $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); + $this->assertStringStartsWith('https://cdn.akamai.steamstatic.com/steam/apps/1077580/header.jpg?t=', $metadata->image); } public function testNotFound() diff --git a/tests/fixture/Nijie/testAnimationGifResponse.html b/tests/fixture/Nijie/testAnimationGifResponse.html index 6cb42c13..37a94a40 100644 --- a/tests/fixture/Nijie/testAnimationGifResponse.html +++ b/tests/fixture/Nijie/testAnimationGifResponse.html @@ -1,9 +1,32 @@ -ニジエがgifに対応したんだってね 奥さん | 黒末アプコ | ニジエ -

ニジエがgifに対応したんだってね 奥さん | 黒末アプコ