Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8145037330 | ||
![]() |
fd3da94ce8 | ||
![]() |
fb48f1fd74 | ||
![]() |
407fd192bd | ||
![]() |
46449a2836 | ||
![]() |
1b5f690f4e | ||
![]() |
f377b143d2 | ||
![]() |
116b3d7f70 | ||
![]() |
3b37e86e55 | ||
![]() |
ee77c3e660 | ||
![]() |
65cb2127ef | ||
![]() |
23ebe46b0e | ||
![]() |
3abf0d039c | ||
![]() |
9008f5c7f2 | ||
![]() |
1c777d48c2 | ||
![]() |
8021d42a62 | ||
![]() |
4d756bde09 | ||
![]() |
2ea7c31f67 | ||
![]() |
70dc74ecd4 | ||
![]() |
c7253004e3 | ||
![]() |
fa09ceac1b | ||
![]() |
ef45c0ae72 | ||
![]() |
3dd4dce0d3 | ||
![]() |
3be69a3df5 | ||
![]() |
9798d40288 | ||
![]() |
55cab01b42 |
@@ -9,9 +9,6 @@ LOG_CHANNEL=stack
|
|||||||
# テストにモックを使用するか falseの場合は実際のHTML等を取得してテストする
|
# テストにモックを使用するか falseの場合は実際のHTML等を取得してテストする
|
||||||
TEST_USE_HTTP_MOCK=true
|
TEST_USE_HTTP_MOCK=true
|
||||||
|
|
||||||
# テスト用のスナップショットを更新する場合はtrueにする (TEST_USE_HTTP_MOCKと重複させないよう注意)
|
|
||||||
TEST_UPDATE_SNAPSHOT=false
|
|
||||||
|
|
||||||
DB_CONNECTION=pgsql
|
DB_CONNECTION=pgsql
|
||||||
DB_HOST=db
|
DB_HOST=db
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
|
14
.github/dependabot.yml
vendored
14
.github/dependabot.yml
vendored
@@ -1,14 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
|
|
||||||
# Maintain dependencies for npm
|
|
||||||
- package-ecosystem: "npm"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
|
|
||||||
# Maintain dependencies for Composer
|
|
||||||
- package-ecosystem: "composer"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
@@ -27,18 +27,12 @@ class CienResolver extends MetadataResolver
|
|||||||
$res = $this->client->get($url);
|
$res = $this->client->get($url);
|
||||||
$metadata = $this->ogpResolver->parse((string) $res->getBody());
|
$metadata = $this->ogpResolver->parse((string) $res->getBody());
|
||||||
|
|
||||||
// 画像URLのJWTから有効期限を拾う
|
// 画像URLから有効期限の起点を拾う
|
||||||
parse_str(parse_url($metadata->image, PHP_URL_QUERY), $params);
|
parse_str(parse_url($metadata->image, PHP_URL_QUERY), $params);
|
||||||
if (empty($params['jwt'])) {
|
if (empty($params['px-time'])) {
|
||||||
throw new \RuntimeException('Parameter "jwt" not found. Image=' . $metadata->image . ' Source=' . $url);
|
throw new \RuntimeException('Parameter "px-time" not found. Image=' . $metadata->image . ' Source=' . $url);
|
||||||
}
|
}
|
||||||
$parts = explode('.', $params['jwt']);
|
$metadata->expires_at = Carbon::createFromTimestamp($params['px-time'])->addHour(1);
|
||||||
if (count($parts) !== 3) {
|
|
||||||
throw new \RuntimeException('Invalid jwt. Image=' . $metadata->image . ' Source=' . $url);
|
|
||||||
}
|
|
||||||
$payload = json_decode(base64_decode(str_replace(['-', '_'], ['+', '/'], $parts[1])), true);
|
|
||||||
|
|
||||||
$metadata->expires_at = Carbon::createFromTimestamp($payload['exp']);
|
|
||||||
|
|
||||||
return $metadata;
|
return $metadata;
|
||||||
}
|
}
|
||||||
|
@@ -162,11 +162,6 @@ class MetadataResolveService
|
|||||||
$client = app(Client::class);
|
$client = app(Client::class);
|
||||||
try {
|
try {
|
||||||
$res = $client->get($robotsUrl);
|
$res = $client->get($robotsUrl);
|
||||||
if (stripos($res->getHeaderLine('Content-Type'), 'text/plain') !== 0) {
|
|
||||||
Log::error('robots.txtの取得に失敗: 不適切なContent-Type (' . $res->getHeaderLine('Content-Type') . ')');
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (string) $res->getBody();
|
return (string) $res->getBody();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@@ -20,28 +20,28 @@ class CienResolverTest extends TestCase
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Cien/test.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Cien/test.html');
|
||||||
|
|
||||||
$this->createResolver(CienResolver::class, $responseText);
|
$this->createResolver(CienResolver::class, $responseText);
|
||||||
|
|
||||||
$metadata = $this->resolver->resolve('https://ci-en.dlsite.com/creator/2462/article/87502');
|
$metadata = $this->resolver->resolve('https://ci-en.dlsite.com/creator/2462/article/87502');
|
||||||
$this->assertSame('進捗とボツ立ち絵 - ねんない5 - Ci-en(シエン)', $metadata->title);
|
$this->assertSame('進捗とボツ立ち絵', $metadata->title);
|
||||||
$this->assertSame('今日のサムネイルはストアページに掲載する予定のキャラクター紹介画像です。 ドットでない解像度の高いイラストは時間も体力も精神力もかかるので、こういうのを行うタスクを開発終盤に残さないでよかったと本気……', $metadata->description);
|
$this->assertSame('ドット製2D ACTを製作しています。' . PHP_EOL . '恐ろしい存在に襲われる絶望感や、被虐的な官能がテーマです。', $metadata->description);
|
||||||
$this->assertStringStartsWith('https://media.ci-en.jp/private/attachment/creator/00002462/a7afd3b02a6d1caa6afe6a3bf5550fb6a42aefba686f17a0a2f63c97fd6867ab/image-800.jpg?jwt=', $metadata->image);
|
$this->assertStringStartsWith('https://media.ci-en.jp/private/attachment/creator/00002462/a7afd3b02a6d1caa6afe6a3bf5550fb6a42aefba686f17a0a2f63c97fd6867ab/image-800.jpg?px-time=', $metadata->image);
|
||||||
if ($this->shouldUseMock()) {
|
if ($this->shouldUseMock()) {
|
||||||
$this->assertSame('https://media.ci-en.jp/private/attachment/creator/00002462/a7afd3b02a6d1caa6afe6a3bf5550fb6a42aefba686f17a0a2f63c97fd6867ab/image-800.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJrZXkiOiJqd3RhdXRoX3NlY18yMDIwT2N0IiwiaXNzIjoiaHR0cHM6XC9cL2NpLWVuLmRsc2l0ZS5jb21cLyIsInN1YiI6IjAwMDAwMDAwMDAwIiwiYXVkIjoiYTdhZmQzYjAyYTZkMWNhYTZhZmU2YTNiZjU1NTBmYjZhNDJhZWZiYTY4NmYxN2EwYTJmNjNjOTdmZDY4NjdhYiIsImV4cCI6MTYwMjk5NTIyMX0.bXUG2T6nXl4hdvsvt1wkIMvbbBdsKk-xbwB6SaxARZA', $metadata->image);
|
$this->assertSame('https://media.ci-en.jp/private/attachment/creator/00002462/a7afd3b02a6d1caa6afe6a3bf5550fb6a42aefba686f17a0a2f63c97fd6867ab/image-800.jpg?px-time=1568231879&px-hash=70c57e9a73d5afb4ac5363d1f37a851af8e0cb1f', $metadata->image);
|
||||||
$this->assertSame(1602995221, $metadata->expires_at->timestamp);
|
$this->assertSame(1568235479, $metadata->expires_at->timestamp);
|
||||||
$this->assertSame('https://ci-en.dlsite.com/creator/2462/article/87502', (string) $this->handler->getLastRequest()->getUri());
|
$this->assertSame('https://ci-en.dlsite.com/creator/2462/article/87502', (string) $this->handler->getLastRequest()->getUri());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithNoTimestamp()
|
public function testWithNoTimestamp()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Cien/testWithNoTimestamp.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Cien/testWithNoTimestamp.html');
|
||||||
$this->createResolver(CienResolver::class, $responseText);
|
$this->createResolver(CienResolver::class, $responseText);
|
||||||
|
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(\RuntimeException::class);
|
||||||
$this->expectExceptionMessage('Parameter "jwt" not found. Image=https://ci-en.dlsite.com/assets/img/common/logo_Ci-en_R18.svg Source=https://ci-en.dlsite.com/');
|
$this->expectExceptionMessage('Parameter "px-time" not found. Image=https://ci-en.dlsite.com/assets/img/common/logo_Ci-en_R18.svg Source=https://ci-en.dlsite.com/');
|
||||||
|
|
||||||
$this->resolver->resolve('https://ci-en.dlsite.com/');
|
$this->resolver->resolve('https://ci-en.dlsite.com/');
|
||||||
}
|
}
|
||||||
|
@@ -8,8 +8,6 @@ use GuzzleHttp\Handler\MockHandler;
|
|||||||
use GuzzleHttp\HandlerStack;
|
use GuzzleHttp\HandlerStack;
|
||||||
use GuzzleHttp\Psr7\Response;
|
use GuzzleHttp\Psr7\Response;
|
||||||
use Monolog\Handler\AbstractHandler;
|
use Monolog\Handler\AbstractHandler;
|
||||||
use Psr\Http\Message\RequestInterface;
|
|
||||||
use Psr\Http\Message\ResponseInterface;
|
|
||||||
|
|
||||||
trait CreateMockedResolver
|
trait CreateMockedResolver
|
||||||
{
|
{
|
||||||
@@ -23,18 +21,6 @@ trait CreateMockedResolver
|
|||||||
*/
|
*/
|
||||||
protected $handler;
|
protected $handler;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $snapshotFilename;
|
|
||||||
|
|
||||||
protected function fetchSnapshot(string $filename): string
|
|
||||||
{
|
|
||||||
$this->snapshotFilename = $filename;
|
|
||||||
|
|
||||||
return file_get_contents($filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $resolverClass
|
* @param string $resolverClass
|
||||||
* @param string $responseText
|
* @param string $responseText
|
||||||
@@ -44,27 +30,19 @@ trait CreateMockedResolver
|
|||||||
*/
|
*/
|
||||||
protected function createResolver(string $resolverClass, string $responseText, array $headers = [], int $status = 200)
|
protected function createResolver(string $resolverClass, string $responseText, array $headers = [], int $status = 200)
|
||||||
{
|
{
|
||||||
if (!$this->shouldUseMock() && !$this->shouldUpdateSnapshot()) {
|
if (!$this->shouldUseMock()) {
|
||||||
$this->resolver = app()->make($resolverClass);
|
$this->resolver = app()->make($resolverClass);
|
||||||
|
|
||||||
return $this->resolver;
|
return $this->resolver;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->shouldUseMock()) {
|
$headers += [
|
||||||
$headers += [
|
'content-type' => 'text/html',
|
||||||
'content-type' => 'text/html',
|
];
|
||||||
];
|
|
||||||
|
|
||||||
$mockResponse = new Response($status, $headers, $responseText);
|
|
||||||
$this->handler = new MockHandler([$mockResponse]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$stack = HandlerStack::create($this->handler);
|
|
||||||
$client = new Client(['handler' => $stack]);
|
|
||||||
if ($this->shouldUpdateSnapshot()) {
|
|
||||||
$stack->push($this->makeUpdateSnapshotMiddleware());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$mockResponse = new Response($status, $headers, $responseText);
|
||||||
|
$this->handler = new MockHandler([$mockResponse]);
|
||||||
|
$client = new Client(['handler' => HandlerStack::create($this->handler)]);
|
||||||
$this->resolver = app()->make($resolverClass, ['client' => $client]);
|
$this->resolver = app()->make($resolverClass, ['client' => $client]);
|
||||||
|
|
||||||
return $this->resolver;
|
return $this->resolver;
|
||||||
@@ -74,27 +52,4 @@ trait CreateMockedResolver
|
|||||||
{
|
{
|
||||||
return (bool) env('TEST_USE_HTTP_MOCK', true);
|
return (bool) env('TEST_USE_HTTP_MOCK', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shouldUpdateSnapshot(): bool
|
|
||||||
{
|
|
||||||
return (bool) env('TEST_UPDATE_SNAPSHOT', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function makeUpdateSnapshotMiddleware(): callable
|
|
||||||
{
|
|
||||||
return function (callable $next) {
|
|
||||||
return function (RequestInterface $request, array $options) use ($next) {
|
|
||||||
return $next($request, $options)->then(function (ResponseInterface $response) {
|
|
||||||
if (empty($this->snapshotFilename)) {
|
|
||||||
throw new \RuntimeException('スナップショットのファイル名が分かりません。file_get_contents()を使っている場合、fetchSnapshot()に置き換えてください。');
|
|
||||||
}
|
|
||||||
|
|
||||||
file_put_contents($this->snapshotFilename, (string) $response->getBody());
|
|
||||||
fwrite(STDERR, "Snapshot Updated: {$this->snapshotFilename}\n");
|
|
||||||
|
|
||||||
return $response;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testHome()
|
public function testHome()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testSoft()
|
public function testSoft()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testSoft.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testSoft.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testComic()
|
public function testComic()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testComic.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testComic.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testManiax()
|
public function testManiax()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testManiax.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testManiax.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testPro()
|
public function testPro()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testPro.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testPro.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testBooks()
|
public function testBooks()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testBooks.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testBooks.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testGirls()
|
public function testGirls()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testGirls.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testGirls.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testGirlsPro()
|
public function testGirlsPro()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testGirlsPro.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testGirlsPro.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testBL()
|
public function testBL()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testBL.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testBL.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testEng()
|
public function testEng()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testEng.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testEng.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testEcchiEng()
|
public function testEcchiEng()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testEcchiEng.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testEcchiEng.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testSPLink()
|
public function testSPLink()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
// SP版(touch)のURLのテストだがリゾルバ側でURLから-touchを削除してPC版を取得するので、PC版の内容を使用する
|
// SP版(touch)のURLのテストだがリゾルバ側でURLから-touchを削除してPC版を取得するので、PC版の内容を使用する
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
@@ -213,7 +213,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testShortLink()
|
public function testShortLink()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testOldAffiliateLink()
|
public function testOldAffiliateLink()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testSnsAffiliateLink()
|
public function testSnsAffiliateLink()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testAffiliateLink()
|
public function testAffiliateLink()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -277,7 +277,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testAffiliateUrl()
|
public function testAffiliateUrl()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHome.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ class DLsiteResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testHTMLdescription()
|
public function testHTMLdescription()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DLsite/testHTMLdescription.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DLsite/testHTMLdescription.html');
|
||||||
|
|
||||||
$this->createResolver(DLsiteResolver::class, $responseText);
|
$this->createResolver(DLsiteResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class DeviantArtResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testMature()
|
public function testMature()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/DeviantArt/mature.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/DeviantArt/mature.json');
|
||||||
|
|
||||||
$this->createResolver(DeviantArtResolver::class, $responseText);
|
$this->createResolver(DeviantArtResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class FC2ContentsResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testAdult()
|
public function testAdult()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/FC2Contents/adult.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/FC2Contents/adult.html');
|
||||||
|
|
||||||
$this->createResolver(FC2ContentsResolver::class, $responseText);
|
$this->createResolver(FC2ContentsResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ class FC2ContentsResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testGeneral()
|
public function testGeneral()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/FC2Contents/general.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/FC2Contents/general.html');
|
||||||
|
|
||||||
$this->createResolver(FC2ContentsResolver::class, $responseText);
|
$this->createResolver(FC2ContentsResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class FantiaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Fantia/test.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Fantia/test.json');
|
||||||
|
|
||||||
$this->createResolver(FantiaResolver::class, $responseText);
|
$this->createResolver(FantiaResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ class FanzaResolverTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function test($filename, $url, $title, $description, $image, $tags)
|
public function test($filename, $url, $title, $description, $image, $tags)
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . "/../../fixture/Fanza/{$filename}");
|
$responseText = file_get_contents(__DIR__ . "/../../fixture/Fanza/{$filename}");
|
||||||
|
|
||||||
$this->createResolver(FanzaResolver::class, $responseText);
|
$this->createResolver(FanzaResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class HentaiFoundryResolverTest extends TestCase
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/HentaiFoundry/illust.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/HentaiFoundry/illust.html');
|
||||||
|
|
||||||
$this->createResolver(HentaiFoundryResolver::class, $responseText);
|
$this->createResolver(HentaiFoundryResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class IwaraResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testVideo()
|
public function testVideo()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Iwara/video.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Iwara/video.html');
|
||||||
|
|
||||||
$this->createResolver(IwaraResolver::class, $responseText);
|
$this->createResolver(IwaraResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ class IwaraResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testYouTube()
|
public function testYouTube()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Iwara/youtube.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Iwara/youtube.html');
|
||||||
|
|
||||||
$this->createResolver(IwaraResolver::class, $responseText);
|
$this->createResolver(IwaraResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ class IwaraResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testImages()
|
public function testImages()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Iwara/images.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Iwara/images.html');
|
||||||
|
|
||||||
$this->createResolver(IwaraResolver::class, $responseText);
|
$this->createResolver(IwaraResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class Kb10uyShortStoryServerResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testNormalPost()
|
public function testNormalPost()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Kb10uyShortStoryServer/tomone.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Kb10uyShortStoryServer/tomone.html');
|
||||||
|
|
||||||
$this->createResolver(Kb10uyShortStoryServerResolver::class, $responseText);
|
$this->createResolver(Kb10uyShortStoryServerResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class KomifloResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testComic()
|
public function testComic()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Komiflo/comic.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Komiflo/comic.json');
|
||||||
|
|
||||||
$this->createResolver(KomifloResolver::class, $responseText);
|
$this->createResolver(KomifloResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class KomifloResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testComicWithNoParents()
|
public function testComicWithNoParents()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Komiflo/comicWithNoParents.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Komiflo/comicWithNoParents.json');
|
||||||
|
|
||||||
$this->createResolver(KomifloResolver::class, $responseText);
|
$this->createResolver(KomifloResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class NicoSeigaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testSeiga()
|
public function testSeiga()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/NicoSeiga/seiga.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/NicoSeiga/seiga.html');
|
||||||
|
|
||||||
$this->createResolver(NicoSeigaResolver::class, $responseText);
|
$this->createResolver(NicoSeigaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ class NicoSeigaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testShunga()
|
public function testShunga()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/NicoSeiga/shunga.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/NicoSeiga/shunga.html');
|
||||||
|
|
||||||
$this->createResolver(NicoSeigaResolver::class, $responseText);
|
$this->createResolver(NicoSeigaResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testStandardPicture()
|
public function testStandardPicture()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testMultiplePicture()
|
public function testMultiplePicture()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testAnimationGif()
|
public function testAnimationGif()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testMp4Movie()
|
public function testMp4Movie()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testViewPopup()
|
public function testViewPopup()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testSp()
|
public function testSp()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testSpViewPopup()
|
public function testSpViewPopup()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ class NijieResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testHasHtmlInAuthorProfile()
|
public function testHasHtmlInAuthorProfile()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Nijie/testHasHtmlInAuthorProfileResponse.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testHasHtmlInAuthorProfileResponse.html');
|
||||||
|
|
||||||
$this->createResolver(NijieResolver::class, $responseText);
|
$this->createResolver(NijieResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class PixivResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testIllust()
|
public function testIllust()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
||||||
|
|
||||||
$this->createResolver(PixivResolver::class, $responseText);
|
$this->createResolver(PixivResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class PixivResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testIllustMultiPages()
|
public function testIllustMultiPages()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illustMultiPages.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illustMultiPages.json');
|
||||||
|
|
||||||
$this->createResolver(PixivResolver::class, $responseText);
|
$this->createResolver(PixivResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ class PixivResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testManga()
|
public function testManga()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/manga.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/manga.json');
|
||||||
|
|
||||||
$this->createResolver(PixivResolver::class, $responseText);
|
$this->createResolver(PixivResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class PixivResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testArtworkUrl()
|
public function testArtworkUrl()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
||||||
|
|
||||||
$this->createResolver(PixivResolver::class, $responseText);
|
$this->createResolver(PixivResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class PixivResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testArtworkUrlEn()
|
public function testArtworkUrlEn()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Pixiv/illust.json');
|
||||||
|
|
||||||
$this->createResolver(PixivResolver::class, $responseText);
|
$this->createResolver(PixivResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class PlurkResolverTest extends TestCase
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Plurk/test.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Plurk/test.html');
|
||||||
|
|
||||||
$this->createResolver(PlurkResolver::class, $responseText);
|
$this->createResolver(PlurkResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class SteamResolverTest extends TestCase
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Steam/test.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Steam/test.json');
|
||||||
|
|
||||||
$this->createResolver(SteamResolver::class, $responseText);
|
$this->createResolver(SteamResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ class SteamResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testR18()
|
public function testR18()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Steam/testR18.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Steam/testR18.json');
|
||||||
|
|
||||||
$this->createResolver(SteamResolver::class, $responseText);
|
$this->createResolver(SteamResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ class SteamResolverTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(\RuntimeException::class);
|
||||||
|
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Steam/testNotFound.json');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Steam/testNotFound.json');
|
||||||
|
|
||||||
$this->createResolver(SteamResolver::class, $responseText);
|
$this->createResolver(SteamResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testTora()
|
public function testTora()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testTora.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testTora.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testToraR()
|
public function testToraR()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testToraR.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testToraR.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testToraD()
|
public function testToraD()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testToraD.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testToraD.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testToraRD()
|
public function testToraRD()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testToraRD.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testToraRD.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testJoshi()
|
public function testJoshi()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshi.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshi.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testJoshiR()
|
public function testJoshiR()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshiR.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshiR.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testJoshiD()
|
public function testJoshiD()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshiD.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshiD.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ class ToranoanaResolverTest extends TestCase
|
|||||||
|
|
||||||
public function testJoshiRD()
|
public function testJoshiRD()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Toranoana/testJoshiRD.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Toranoana/testJoshiRD.html');
|
||||||
|
|
||||||
$this->createResolver(ToranoanaResolver::class, $responseText);
|
$this->createResolver(ToranoanaResolver::class, $responseText);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ class XtubeResolverTest extends TestCase
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$responseText = $this->fetchSnapshot(__DIR__ . '/../../fixture/Xtube/video.html');
|
$responseText = file_get_contents(__DIR__ . '/../../fixture/Xtube/video.html');
|
||||||
|
|
||||||
$this->createResolver(XtubeResolver::class, $responseText);
|
$this->createResolver(XtubeResolver::class, $responseText);
|
||||||
|
|
||||||
|
306
tests/fixture/Cien/test.html
vendored
306
tests/fixture/Cien/test.html
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user