don't use online calls for tests
This commit is contained in:
parent
4dd278d71f
commit
48bb921d7d
|
@ -38,8 +38,9 @@ class ItchTest extends TestCase
|
|||
}
|
||||
public function testPageParsing()
|
||||
{
|
||||
// we trick parser to think the page is online but we parse an offline copy
|
||||
$url = 'https://zarf.itch.io/spider-and-web';
|
||||
$game_page = $this->parser->get_text($url);
|
||||
$game_page = file_get_contents('./tests/fixtures/itch_test_1.html');
|
||||
$this->parser->loadStr($game_page, []);
|
||||
$game = $this->parser->page($url);
|
||||
$this->assertSame($game->url, $url);
|
||||
|
|
12
tests/fixtures/itch_test_1.html
vendored
Normal file
12
tests/fixtures/itch_test_1.html
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in a new issue