Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
Showing only changes of commit 5f6119c86b - Show all commits

View File

@ -3,22 +3,25 @@
use Aviat\AnimeClient\Transformer\Hummingbird\MangaListsZipper; use Aviat\AnimeClient\Transformer\Hummingbird\MangaListsZipper;
class MangaListsZipperTest extends AnimeClient_TestCase { class MangaListsZipperTest extends AnimeClient_TestCase {
protected $start_file = __DIR__ . '/../../test_data/manga_list/manga.json'; protected $start_file = '';
protected $res_file = __DIR__ . '/../../test_data/manga_list/manga-zippered.json'; protected $res_file = '';
public function setUp() public function setUp()
{ {
$this->start_file = __DIR__ . '/../../test_data/manga_list/manga.json';
$this->res_file = __DIR__ . '/../../test_data/manga_list/manga-zippered.json';
$json = json_decode(file_get_contents($this->start_file), TRUE); $json = json_decode(file_get_contents($this->start_file), TRUE);
$this->mangaListsZipper = new MangaListsZipper($json); $this->mangaListsZipper = new MangaListsZipper($json);
} }
public function testTransform() public function testTransform()
{ {
$zippered_json = json_decode(file_get_contents($this->res_file), TRUE); $zippered_json = json_decode(file_get_contents($this->res_file), TRUE);
$transformed = $this->mangaListsZipper->transform(); $transformed = $this->mangaListsZipper->transform();
$this->assertEquals($zippered_json, $transformed); $this->assertEquals($zippered_json, $transformed);
} }
} }