From 1d9808970d7b22c99b2d5784c2985452ff20e392 Mon Sep 17 00:00:00 2001 From: Irie Aoi Date: Sat, 13 Feb 2021 15:19:15 +0900 Subject: [PATCH] =?UTF-8?q?nijie=20=E3=83=86=E3=82=B9=E3=83=88=E3=81=AB?= =?UTF-8?q?=E4=BD=BF=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=82=A4=E3=83=A9?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=8C=E6=B6=88=E3=81=88=E3=81=A6=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E5=A5=BD=E3=81=8D=E3=81=AA=E3=82=84=E3=81=A4?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MetadataResolver/NijieResolverTest.php | 10 ++--- .../Nijie/testAnimationGifResponse.html | 45 ++++++++++++++----- .../testHasHtmlInAuthorProfileResponse.html | 14 +++--- tests/fixture/Nijie/testMp4MovieResponse.html | 14 +++--- .../Nijie/testMultiplePictureResponse.html | 14 +++--- .../Nijie/testStandardPictureResponse.html | 10 ++--- 6 files changed, 65 insertions(+), 42 deletions(-) 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/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に対応したんだってね 奥さん | 黒末アプコ