From 4747f822ab0f3239274b080772f83a8bc5521ba0 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Tue, 2 Jul 2019 12:44:25 +0900 Subject: [PATCH 1/8] Lint tests --- .../MetadataResolver/CreateMockedResolver.php | 2 +- .../MetadataResolver/DLsiteResolverTest.php | 52 +++++++++---------- .../FC2ContentsResolverTest.php | 4 +- .../MetadataResolver/KomifloResolverTest.php | 8 +-- .../MetadataResolver/NijieResolverTest.php | 16 +++--- .../MetadataResolver/PixivResolverTest.php | 12 ++--- .../MetadataResolver/PlurkResolverTest.php | 2 +- 7 files changed, 48 insertions(+), 48 deletions(-) diff --git a/tests/Unit/MetadataResolver/CreateMockedResolver.php b/tests/Unit/MetadataResolver/CreateMockedResolver.php index a97e7c8..528728c 100644 --- a/tests/Unit/MetadataResolver/CreateMockedResolver.php +++ b/tests/Unit/MetadataResolver/CreateMockedResolver.php @@ -49,6 +49,6 @@ trait CreateMockedResolver protected function shouldUseMock(): bool { - return (bool)env('TEST_USE_HTTP_MOCK', true); + return (bool) env('TEST_USE_HTTP_MOCK', true); } } diff --git a/tests/Unit/MetadataResolver/DLsiteResolverTest.php b/tests/Unit/MetadataResolver/DLsiteResolverTest.php index e23c4a0..780d73e 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 = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -28,7 +28,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('ひつじ、数えてあげるっ', $metadata->title); $this->assertEquals('サークル名: Butterfly Dream' . PHP_EOL . '眠れないあなたに彼女が羊を数えてくれる音声です。', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ222000/RJ221761_img_main.jpg', $metadata->image); - $this->assertEquals(['癒し','バイノーラル/ダミヘ','日常/生活','ほのぼの','恋人同士'], $metadata->tags); + $this->assertEquals(['癒し', 'バイノーラル/ダミヘ', '日常/生活', 'ほのぼの', '恋人同士'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/home/work/=/product_id/RJ221761.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -36,7 +36,7 @@ class DLsiteResolverTest extends TestCase public function testSoft() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testSoft.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testSoft.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -44,7 +44,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('ことのはアムリラート', $metadata->title); $this->assertEquals('メーカー名: SukeraSparo' . PHP_EOL . '異世界へと迷い込んだ凜に救いの手を差し伸べるルカ――。これは、ふたりが手探りの意思疎通(ことのは)で織りなす、もどかしくも純粋な……女の子同士の物語。', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/professional/VJ012000/VJ011276_img_main.jpg', $metadata->image); - $this->assertEquals(['少女','日常/生活','純愛','百合'], $metadata->tags); + $this->assertEquals(['少女', '日常/生活', '純愛', '百合'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/soft/work/=/product_id/VJ011276.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -52,7 +52,7 @@ class DLsiteResolverTest extends TestCase public function testComic() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testComic.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testComic.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -60,7 +60,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('快楽ヒストリエ', $metadata->title); $this->assertEquals('著者: 火鳥' . PHP_EOL . '天地創造と原初の人類を描いた「創世編」をはじめ、英雄たちの偉業を大真面目に考証した正真正銘の学術コミック全15編。', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/books/BJ139000/BJ138581_img_main.jpg', $metadata->image); - $this->assertEquals(['おっぱい','ロリ','ショタ','妹','男性/おやじ','女王様/お姫様','王子様/王子系','戦士','セーラー服','着物/和服','青年コミック','ギャグ','コメディ','歴史/時代物','褐色/日焼け','爺'], $metadata->tags); + $this->assertEquals(['おっぱい', 'ロリ', 'ショタ', '妹', '男性/おやじ', '女王様/お姫様', '王子様/王子系', '戦士', 'セーラー服', '着物/和服', '青年コミック', 'ギャグ', 'コメディ', '歴史/時代物', '褐色/日焼け', '爺'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/comic/work/=/product_id/BJ138581.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -68,7 +68,7 @@ class DLsiteResolverTest extends TestCase public function testManiax() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testManiax.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testManiax.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -76,7 +76,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('催眠術で新婚人妻マナカさんとエッチしよう', $metadata->title); $this->assertEquals('サークル名: デルタブレード' . PHP_EOL . '催眠術で新婚人妻マナカさんの愛する夫にすり替わって子作りラブラブエッチをするCG集です。', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ206000/RJ205445_img_main.jpg', $metadata->image); - $this->assertEquals(['断面図','人妻','中出し','妊娠/孕ませ','催眠','口内射精'], $metadata->tags); + $this->assertEquals(['断面図', '人妻', '中出し', '妊娠/孕ませ', '催眠', '口内射精'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/maniax/work/=/product_id/RJ205445.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -84,7 +84,7 @@ class DLsiteResolverTest extends TestCase public function testPro() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testPro.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testPro.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -92,7 +92,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('euphoria (HDリマスター) Best Price版', $metadata->title); $this->assertEquals('ブランド名: CLOCK UP' . PHP_EOL . 'インモラルハードコアADV「euphoria」が高解像度(1024×768)版、「euphoria HDリマスター」となって登場!', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/professional/VJ009000/VJ008455_img_main.jpg', $metadata->image); - $this->assertEquals(['アブノーマル','幼なじみ','女教師','退廃/背徳/インモラル','拘束','強制/無理矢理','スカトロ','アヘ顔','拷問','血液/流血','狂気'], $metadata->tags); + $this->assertEquals(['アブノーマル', '幼なじみ', '女教師', '退廃/背徳/インモラル', '拘束', '強制/無理矢理', 'スカトロ', 'アヘ顔', '拷問', '血液/流血', '狂気'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/pro/work/=/product_id/VJ008455.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -100,7 +100,7 @@ class DLsiteResolverTest extends TestCase public function testBooks() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testBooks.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testBooks.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -108,7 +108,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('永遠娘 vol.6', $metadata->title); $this->assertEquals('著者: あまがえる / 玉之けだま / びんせん / 甘露アメ / 源五郎 / すみやお / 宇宙烏賊 / 毒茸人 / あやね / ガロウド / ハードボイルドよし子 / 夜歌 / 黒青郎君' . PHP_EOL . '君の命はどんな味なのだろうな?', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/books/BJ192000/BJ191317_img_main.jpg', $metadata->image); - $this->assertEquals(['ツンデレ','ロリ','妖怪','人外娘/モンスター娘','セーラー服','メイド','ストッキング','ファンタジー','ぶっかけ','中出し','近親相姦','アヘ顔','口内射精'], $metadata->tags); + $this->assertEquals(['ツンデレ', 'ロリ', '妖怪', '人外娘/モンスター娘', 'セーラー服', 'メイド', 'ストッキング', 'ファンタジー', 'ぶっかけ', '中出し', '近親相姦', 'アヘ顔', '口内射精'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/books/work/=/product_id/BJ191317.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -116,7 +116,7 @@ class DLsiteResolverTest extends TestCase public function testGirls() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testGirls.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testGirls.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -124,7 +124,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('体イク教師', $metadata->title); $this->assertEquals('サークル名: Dusk' . PHP_EOL . '思い込みの激しい体育教師に執着されるお話', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ218000/RJ217995_img_main.jpg', $metadata->image); - $this->assertEquals(['教師','中出し','陵辱','変態','強制/無理矢理','レイプ'], $metadata->tags); + $this->assertEquals(['教師', '中出し', '陵辱', '変態', '強制/無理矢理', 'レイプ'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/girls/work/=/product_id/RJ217995.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -132,7 +132,7 @@ class DLsiteResolverTest extends TestCase public function testGirlsPro() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testGirlsPro.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testGirlsPro.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -140,7 +140,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('×××レクチャー', $metadata->title); $this->assertEquals('著者: 江口尋' . PHP_EOL . '昔、告白してくれた地味な同級生・瀬尾は超人気セクシー男優になっていて!?', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/books/BJ171000/BJ170641_img_main.jpg', $metadata->image); - $this->assertEquals(['メガネ','芸能人/アイドル/モデル','俺様','ラブコメ','ラブラブ/あまあま','ティーンズラブ','調教','褐色/日焼け'], $metadata->tags); + $this->assertEquals(['メガネ', '芸能人/アイドル/モデル', '俺様', 'ラブコメ', 'ラブラブ/あまあま', 'ティーンズラブ', '調教', '褐色/日焼け'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/girls-pro/work/=/product_id/BJ170641.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -148,7 +148,7 @@ class DLsiteResolverTest extends TestCase public function testBL() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testBL.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testBL.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -156,7 +156,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('秘密に堕つ', $metadata->title); $this->assertEquals('サークル名: ナゲットぶん投げ屋さん' . PHP_EOL . 'とある村に越してきた新婚夫婦。村の集会所で行われた歓迎会で犯される花婿。村の男達に犯され続けた花婿にある変化が…?', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ245000/RJ244977_img_main.jpg', $metadata->image); - $this->assertEquals(['既婚者','中出し','強制/無理矢理','レイプ','モブ姦'], $metadata->tags); + $this->assertEquals(['既婚者', '中出し', '強制/無理矢理', 'レイプ', 'モブ姦'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/bl/work/=/product_id/RJ244977.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -164,7 +164,7 @@ class DLsiteResolverTest extends TestCase public function testEng() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testEng.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testEng.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -172,7 +172,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('With Your First Girlfriend, at a Ghostly Night [Ear Cleaning] [Sleep Sharing]', $metadata->title); $this->assertEquals('Circle: Triangle!' . PHP_EOL . 'You go with a girl of your first love and enjoy going to haunted places and her massage, ear cleaning, sleep sharing etc. (CV: Yui Asami)', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ229000/RJ228866_img_main.jpg', $metadata->image); - $this->assertEquals(['Healing','Binaural','ASMR','Childhood Friend','Ear Cleaning','Romance'], $metadata->tags); + $this->assertEquals(['Healing', 'Binaural', 'ASMR', 'Childhood Friend', 'Ear Cleaning', 'Romance'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/eng/work/=/product_id/RE228866.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -180,7 +180,7 @@ class DLsiteResolverTest extends TestCase public function testEcchiEng() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testEcchiEng.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testEcchiEng.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -188,7 +188,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('NEKOPARA vol.1', $metadata->title); $this->assertEquals('Circle: NEKO WORKs' . PHP_EOL . 'Chocolat and Vanilla star in a rich adult eroge series with E-mote system and animated H scenes', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ145000/RJ144678_img_main.jpg', $metadata->image); - $this->assertEquals(['Moe','Master and Servant','Funny Love Story','Nekomimi (Cat Ears)'], $metadata->tags); + $this->assertEquals(['Moe', 'Master and Servant', 'Funny Love Story', 'Nekomimi (Cat Ears)'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/ecchi-eng/work/=/product_id/RE144678.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -196,7 +196,7 @@ class DLsiteResolverTest extends TestCase public function testSPLink() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testHome.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); // SP版(touch)のURLのテストだがリゾルバ側でURLから-touchを削除してPC版を取得するので、PC版の内容を使用する $this->createResolver(DLsiteResolver::class, $responseText); @@ -205,7 +205,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('ひつじ、数えてあげるっ', $metadata->title); $this->assertEquals('サークル名: Butterfly Dream' . PHP_EOL . '眠れないあなたに彼女が羊を数えてくれる音声です。', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ222000/RJ221761_img_main.jpg', $metadata->image); - $this->assertEquals(['癒し','バイノーラル/ダミヘ','日常/生活','ほのぼの','恋人同士'], $metadata->tags); + $this->assertEquals(['癒し', 'バイノーラル/ダミヘ', '日常/生活', 'ほのぼの', '恋人同士'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.dlsite.com/home/work/=/product_id/RJ221761.html', (string) $this->handler->getLastRequest()->getUri()); } @@ -213,7 +213,7 @@ class DLsiteResolverTest extends TestCase public function testShortLink() { - $responseText = file_get_contents(__DIR__.'/../../fixture/DLsite/testHome.html'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html'); $this->createResolver(DLsiteResolver::class, $responseText); @@ -221,7 +221,7 @@ class DLsiteResolverTest extends TestCase $this->assertEquals('ひつじ、数えてあげるっ', $metadata->title); $this->assertEquals('サークル名: Butterfly Dream' . PHP_EOL . '眠れないあなたに彼女が羊を数えてくれる音声です。', $metadata->description); $this->assertEquals('https://img.dlsite.jp/modpub/images2/work/doujin/RJ222000/RJ221761_img_main.jpg', $metadata->image); - $this->assertEquals(['癒し','バイノーラル/ダミヘ','日常/生活','ほのぼの','恋人同士'], $metadata->tags); + $this->assertEquals(['癒し', 'バイノーラル/ダミヘ', '日常/生活', 'ほのぼの', '恋人同士'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://dlsite.jp/howtw/RJ221761.html', (string) $this->handler->getLastRequest()->getUri()); } diff --git a/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php b/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php index 2cce224..3c2894c 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 = file_get_contents(__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 = file_get_contents(__DIR__ . '/../../fixture/FC2Contents/general.html'); $this->createResolver(FC2ContentsResolver::class, $responseText); diff --git a/tests/Unit/MetadataResolver/KomifloResolverTest.php b/tests/Unit/MetadataResolver/KomifloResolverTest.php index cdb1578..2c9ac0d 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 = file_get_contents(__DIR__ . '/../../fixture/Komiflo/comic.json'); $this->createResolver(KomifloResolver::class, $responseText); @@ -28,7 +28,7 @@ class KomifloResolverTest extends TestCase $this->assertEquals('魔法少女とえっち物語', $metadata->title); $this->assertEquals('薙派 - メガストアα 19.07', $metadata->description); $this->assertEquals('https://t.komiflo.com/564_mobile_large_3x/contents/23a4cd530060b8607aa434f4b299b249e71a4d5c.jpg', $metadata->image); - $this->assertEquals(['薙派','お姉さん','ショタ','ファンタジー','巨乳','野外・露出','羞恥'], $metadata->tags); + $this->assertEquals(['薙派', 'お姉さん', 'ショタ', 'ファンタジー', '巨乳', '野外・露出', '羞恥'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://api.komiflo.com/content/id/5490', (string) $this->handler->getLastRequest()->getUri()); } @@ -36,7 +36,7 @@ class KomifloResolverTest extends TestCase public function testComicWithNoParents() { - $responseText = file_get_contents(__DIR__.'/../../fixture/Komiflo/comicWithNoParents.json'); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Komiflo/comicWithNoParents.json'); $this->createResolver(KomifloResolver::class, $responseText); @@ -44,7 +44,7 @@ class KomifloResolverTest extends TestCase $this->assertEquals('生まれなおしプログラム', $metadata->title); $this->assertEquals('EROKI - ?', $metadata->description); $this->assertEquals('https://t.komiflo.com/564_mobile_large_3x/contents/71cfb83640aead3cdd35e4329c4e2f427606a11d.jpg', $metadata->image); - $this->assertEquals(['EROKI','お姉さん','しつけ','オリジナル','ショートカット','逆転','巨乳'], $metadata->tags); + $this->assertEquals(['EROKI', 'お姉さん', 'しつけ', 'オリジナル', 'ショートカット', '逆転', '巨乳'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://api.komiflo.com/content/id/3414', (string) $this->handler->getLastRequest()->getUri()); } diff --git a/tests/Unit/MetadataResolver/NijieResolverTest.php b/tests/Unit/MetadataResolver/NijieResolverTest.php index 97794a9..eaf50b0 100644 --- a/tests/Unit/MetadataResolver/NijieResolverTest.php +++ b/tests/Unit/MetadataResolver/NijieResolverTest.php @@ -30,7 +30,7 @@ class NijieResolverTest extends TestCase $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=66384', (string)$this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=66384', (string) $this->handler->getLastRequest()->getUri()); } } @@ -46,7 +46,7 @@ class NijieResolverTest extends TestCase $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=202707', (string)$this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=202707', (string) $this->handler->getLastRequest()->getUri()); } } @@ -61,7 +61,7 @@ class NijieResolverTest extends TestCase $this->assertEquals('アニメgifとか専門外なのでよくわかりませんでした', $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); 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=9537', (string) $this->handler->getLastRequest()->getUri()); } } @@ -76,7 +76,7 @@ class NijieResolverTest extends TestCase $this->assertEquals("H264動画てすと あとで消します\r\n\r\n今の所、H264コーデックのみ、出力時に音声なしにしないと投稿できません\r\n動画は勝手にループします", $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=256283', (string)$this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=256283', (string) $this->handler->getLastRequest()->getUri()); } } @@ -92,7 +92,7 @@ class NijieResolverTest extends TestCase $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=66384', (string)$this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=66384', (string) $this->handler->getLastRequest()->getUri()); } } @@ -108,7 +108,7 @@ class NijieResolverTest extends TestCase $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=202707', (string)$this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=202707', (string) $this->handler->getLastRequest()->getUri()); } } @@ -124,7 +124,7 @@ class NijieResolverTest extends TestCase $this->assertEquals('アニメgifとか専門外なのでよくわかりませんでした', $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); 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=9537', (string) $this->handler->getLastRequest()->getUri()); } } @@ -139,7 +139,7 @@ class NijieResolverTest extends TestCase $this->assertEquals("H264動画てすと あとで消します\r\n\r\n今の所、H264コーデックのみ、出力時に音声なしにしないと投稿できません\r\n動画は勝手にループします", $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); if ($this->shouldUseMock()) { - $this->assertSame('https://nijie.info/view.php?id=256283', (string)$this->handler->getLastRequest()->getUri()); + $this->assertSame('https://nijie.info/view.php?id=256283', (string) $this->handler->getLastRequest()->getUri()); } } } diff --git a/tests/Unit/MetadataResolver/PixivResolverTest.php b/tests/Unit/MetadataResolver/PixivResolverTest.php index 6b0326b..818dca5 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 = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -28,7 +28,7 @@ class PixivResolverTest extends TestCase $this->assertEquals('coffee break', $metadata->title); $this->assertEquals('投稿者: 裕' . PHP_EOL, $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()); } @@ -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/illustMultiPages.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -44,7 +44,7 @@ class PixivResolverTest extends TestCase $this->assertEquals('T-20S', $metadata->title); $this->assertEquals('投稿者: amssc' . PHP_EOL . 'JUST FOR FUN' . PHP_EOL . '现在可以做到游戏内立绘修改拉!立绘动态皮肤都可以支持,想要资助获得新技术请站内信联系我。', $metadata->description); $this->assertEquals('https://i.pixiv.cat/img-master/img/2019/05/28/01/16/24/74939802_p0_master1200.jpg', $metadata->image); - $this->assertEquals(['巨乳','母乳','lastorigin','Last_Origin','T-20S','おっぱい','라스트오리진','노움'], $metadata->tags); + $this->assertEquals(['巨乳', '母乳', 'lastorigin', 'Last_Origin', 'T-20S', 'おっぱい', '라스트오리진', '노움'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.pixiv.net/ajax/illust/74939802', (string) $this->handler->getLastRequest()->getUri()); } @@ -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/manga.json'); $this->createResolver(PixivResolver::class, $responseText); @@ -60,7 +60,7 @@ class PixivResolverTest extends TestCase $this->assertEquals('冬の日ラブラブ', $metadata->title); $this->assertEquals('投稿者: Aza' . PHP_EOL . 'ラブラブエッチのらくがき' . PHP_EOL . PHP_EOL . '三万フォロワー感謝します~' . PHP_EOL . PHP_EOL . '最近忙しいので、自分の時間が少ない・・・', $metadata->description); $this->assertEquals('https://i.pixiv.cat/img-master/img/2014/10/25/00/06/58/46713544_p0_master1200.jpg', $metadata->image); - $this->assertEquals(['落書き','おっぱい','オリジナル','パイズリ','中出し','だいしゅきホールド','愛のあるセックス','黒髪ロング','オリジナル10000users入り'], $metadata->tags); + $this->assertEquals(['落書き', 'おっぱい', 'オリジナル', 'パイズリ', '中出し', 'だいしゅきホールド', '愛のあるセックス', '黒髪ロング', 'オリジナル10000users入り'], $metadata->tags); if ($this->shouldUseMock()) { $this->assertSame('https://www.pixiv.net/ajax/illust/46713544', (string) $this->handler->getLastRequest()->getUri()); } diff --git a/tests/Unit/MetadataResolver/PlurkResolverTest.php b/tests/Unit/MetadataResolver/PlurkResolverTest.php index e2f3abe..182e143 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 = file_get_contents(__DIR__ . '/../../fixture/Plurk/test.html'); $this->createResolver(PlurkResolver::class, $responseText); From 598d27f6b85843ea994b68b93796f1be6f7b6195 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Thu, 4 Jul 2019 20:55:33 +0900 Subject: [PATCH 2/8] Revert "Merge pull request #153 from shikorism/fix/140" This reverts commit d044b6db20b2910c1355eb74ef7cbe2978dce731. --- resources/assets/sass/_bootstrap-custom.scss | 10 ---------- resources/views/components/link-card.blade.php | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/resources/assets/sass/_bootstrap-custom.scss b/resources/assets/sass/_bootstrap-custom.scss index bafdd03..a56818a 100644 --- a/resources/assets/sass/_bootstrap-custom.scss +++ b/resources/assets/sass/_bootstrap-custom.scss @@ -6,14 +6,4 @@ .card-img-right { width: 100%; @include border-right-radius($card-inner-border-radius); -} - -.card-img-top-to-left { - width: 100%; - @include media-breakpoint-down(md) { - @include border-top-radius($card-inner-border-radius); - } - @include media-breakpoint-up(lg) { - @include border-left-radius($card-inner-border-radius); - } } \ No newline at end of file diff --git a/resources/views/components/link-card.blade.php b/resources/views/components/link-card.blade.php index a10d707..5ce16d0 100644 --- a/resources/views/components/link-card.blade.php +++ b/resources/views/components/link-card.blade.php @@ -2,7 +2,7 @@
- Thumbnail + Thumbnail
From c4768ded3871024acd67f6bf72e9fe7c67925b4b Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 10 Mar 2019 17:33:29 +0900 Subject: [PATCH 3/8] Revert "Merge pull request #138 from eai04191/feature/bootstrap-custom" This reverts commit 077731495c735c7ae5b1de068f9e8d8e983f6d5d. --- resources/assets/sass/_bootstrap-custom.scss | 9 --------- resources/assets/sass/app.scss | 1 - resources/assets/sass/tissue.css | 12 ++++++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 resources/assets/sass/_bootstrap-custom.scss diff --git a/resources/assets/sass/_bootstrap-custom.scss b/resources/assets/sass/_bootstrap-custom.scss deleted file mode 100644 index a56818a..0000000 --- a/resources/assets/sass/_bootstrap-custom.scss +++ /dev/null @@ -1,9 +0,0 @@ -.card-img-left { - width: 100%; - @include border-left-radius($card-inner-border-radius); -} - -.card-img-right { - width: 100%; - @include border-right-radius($card-inner-border-radius); -} \ No newline at end of file diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss index 928bd95..0fe2b4f 100644 --- a/resources/assets/sass/app.scss +++ b/resources/assets/sass/app.scss @@ -3,7 +3,6 @@ $primary: #e53fb1; // Bootstrap @import "~bootstrap/scss/bootstrap"; -@import "bootstrap-custom"; // Open Iconic @import "~open-iconic/font/css/open-iconic-bootstrap"; diff --git a/resources/assets/sass/tissue.css b/resources/assets/sass/tissue.css index c8d5f15..e98a42f 100644 --- a/resources/assets/sass/tissue.css +++ b/resources/assets/sass/tissue.css @@ -76,4 +76,16 @@ #navbarAccountDropdownSp { max-width: calc(100vw - 5em); +} + +.card-img-left { + width: 100%; + border-top-left-radius: calc(.25rem - 1px); + border-bottom-left-radius: calc(.25rem - 1px); +} + +.card-img-right { + width: 100%; + border-top-right-radius: calc(.25rem - 1px); + border-bottom-right-radius: calc(.25rem - 1px); } \ No newline at end of file From 733e97bc5858b495a6dcf3afe1bda59bea4c4bd7 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Thu, 4 Jul 2019 21:28:26 +0900 Subject: [PATCH 4/8] =?UTF-8?q?card-img=E9=A1=9E=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=80=81.card=E3=81=ABoverflow=E4=BB=98=E4=B8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/sass/components/_link-card.scss | 2 ++ resources/assets/sass/tissue.css | 11 ----------- resources/views/components/link-card.blade.php | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/resources/assets/sass/components/_link-card.scss b/resources/assets/sass/components/_link-card.scss index d572ca2..a154454 100644 --- a/resources/assets/sass/components/_link-card.scss +++ b/resources/assets/sass/components/_link-card.scss @@ -1,4 +1,6 @@ .link-card { + overflow: hidden; + .row > div { max-height: 400px; overflow: hidden; diff --git a/resources/assets/sass/tissue.css b/resources/assets/sass/tissue.css index e98a42f..6c3ebf4 100644 --- a/resources/assets/sass/tissue.css +++ b/resources/assets/sass/tissue.css @@ -78,14 +78,3 @@ max-width: calc(100vw - 5em); } -.card-img-left { - width: 100%; - border-top-left-radius: calc(.25rem - 1px); - border-bottom-left-radius: calc(.25rem - 1px); -} - -.card-img-right { - width: 100%; - border-top-right-radius: calc(.25rem - 1px); - border-bottom-right-radius: calc(.25rem - 1px); -} \ No newline at end of file diff --git a/resources/views/components/link-card.blade.php b/resources/views/components/link-card.blade.php index 5ce16d0..f0d7de3 100644 --- a/resources/views/components/link-card.blade.php +++ b/resources/views/components/link-card.blade.php @@ -2,7 +2,7 @@
- Thumbnail + Thumbnail
From 4f5595dae093b0125c9b0d4519f1bed6dc48930a Mon Sep 17 00:00:00 2001 From: eai04191 Date: Thu, 4 Jul 2019 21:28:54 +0900 Subject: [PATCH 5/8] =?UTF-8?q?vue=E5=81=B4=E3=82=82=E8=BF=BD=E5=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/MetadataPreview.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/components/MetadataPreview.vue b/resources/assets/js/components/MetadataPreview.vue index eeada94..cbce097 100644 --- a/resources/assets/js/components/MetadataPreview.vue +++ b/resources/assets/js/components/MetadataPreview.vue @@ -11,7 +11,7 @@
- Thumbnail + Thumbnail
@@ -90,10 +90,7 @@