24 lines
678 B
PHP
24 lines
678 B
PHP
|
<?php
|
||
|
|
||
|
use Aviat\AnimeClient\Transformer\Hummingbird\MangaListsZipper;
|
||
|
|
||
|
class MangaListsZipperTest extends AnimeClient_TestCase {
|
||
|
|
||
|
protected $start_file = __DIR__ . '/../../test_data/manga_list/manga.json';
|
||
|
protected $res_file = __DIR__ . '/../../test_data/manga_list/manga-zippered.json';
|
||
|
|
||
|
public function setUp()
|
||
|
{
|
||
|
$json = json_decode(file_get_contents($this->start_file), TRUE);
|
||
|
$this->mangaListsZipper = new MangaListsZipper($json);
|
||
|
}
|
||
|
|
||
|
public function testTransform()
|
||
|
{
|
||
|
$zippered_json = json_decode(file_get_contents($this->res_file), TRUE);
|
||
|
$transformed = $this->mangaListsZipper->transform();
|
||
|
|
||
|
$this->assertEquals($zippered_json, $transformed);
|
||
|
}
|
||
|
|
||
|
}
|