Fix tests

This commit is contained in:
Timothy Warren 2018-09-27 16:48:12 -04:00
parent 0f31a5e10a
commit 6f717e6ab7
5 changed files with 22 additions and 22 deletions

View File

@ -20,8 +20,8 @@ use Aviat\AnimeClient\API\JsonAPI;
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer;
use Aviat\AnimeClient\Tests\AnimeClientTestCase; use Aviat\AnimeClient\Tests\AnimeClientTestCase;
use Aviat\AnimeClient\Types\{ use Aviat\AnimeClient\Types\{
MangaFormItem, FormItem,
MangaFormItemData FormItemData
}; };
use Aviat\Ion\Json; use Aviat\Ion\Json;
@ -86,10 +86,10 @@ class MangaListTransformerTest extends AnimeClientTestCase {
]; ];
$actual = $this->transformer->untransform($input); $actual = $this->transformer->untransform($input);
$expected = new MangaFormItem([ $expected = new FormItem([
'id' => '15084773', 'id' => '15084773',
'mal_id' => '26769', 'mal_id' => '26769',
'data' => new MangaFormItemData([ 'data' => new FormItemData([
'status' => 'current', 'status' => 'current',
'progress' => 67, 'progress' => 67,
'reconsuming' => false, 'reconsuming' => false,

View File

@ -1,9 +1,9 @@
<?php return Aviat\AnimeClient\Types\AnimeFormItem::__set_state(array( <?php return Aviat\AnimeClient\Types\FormItem::__set_state(array(
'id' => 14047981, 'id' => 14047981,
'anilist_item_id' => NULL, 'anilist_item_id' => NULL,
'mal_id' => NULL, 'mal_id' => NULL,
'data' => 'data' =>
Aviat\AnimeClient\Types\AnimeFormItemData::__set_state(array( Aviat\AnimeClient\Types\FormItemData::__set_state(array(
'notes' => 'Very formulaic.', 'notes' => 'Very formulaic.',
'private' => false, 'private' => false,
'progress' => 38, 'progress' => 38,

View File

@ -1,9 +1,9 @@
<?php return Aviat\AnimeClient\Types\AnimeFormItem::__set_state(array( <?php return Aviat\AnimeClient\Types\FormItem::__set_state(array(
'id' => 14047981, 'id' => 14047981,
'anilist_item_id' => NULL, 'anilist_item_id' => NULL,
'mal_id' => '12345', 'mal_id' => '12345',
'data' => 'data' =>
Aviat\AnimeClient\Types\AnimeFormItemData::__set_state(array( Aviat\AnimeClient\Types\FormItemData::__set_state(array(
'notes' => 'Very formulaic.', 'notes' => 'Very formulaic.',
'private' => true, 'private' => true,
'progress' => 38, 'progress' => 38,

View File

@ -1,9 +1,9 @@
<?php return Aviat\AnimeClient\Types\AnimeFormItem::__set_state(array( <?php return Aviat\AnimeClient\Types\FormItem::__set_state(array(
'id' => 14047983, 'id' => 14047983,
'anilist_item_id' => NULL, 'anilist_item_id' => NULL,
'mal_id' => '12347', 'mal_id' => '12347',
'data' => 'data' =>
Aviat\AnimeClient\Types\AnimeFormItemData::__set_state(array( Aviat\AnimeClient\Types\FormItemData::__set_state(array(
'notes' => '', 'notes' => '',
'private' => true, 'private' => true,
'progress' => 12, 'progress' => 12,

View File

@ -30,14 +30,14 @@
'titles' => 'titles' =>
array ( array (
), ),
'type' => 'manga', 'type' => 'Manga',
'url' => 'https://kitsu.io/manga/bokura-wa-minna-kawaisou', 'url' => 'https://kitsu.io/manga/bokura-wa-minna-kawaisou',
)), )),
'reading_status' => 'current', 'reading_status' => 'current',
'notes' => '', 'notes' => '',
'rereading' => false, 'rereading' => false,
'reread' => 0, 'reread' => 0,
'user_rating' => 9.0, 'user_rating' => 9,
)), )),
1 => 1 =>
Aviat\AnimeClient\Types\MangaListItem::__set_state(array( Aviat\AnimeClient\Types\MangaListItem::__set_state(array(
@ -70,14 +70,14 @@
'titles' => 'titles' =>
array ( array (
), ),
'type' => 'manga', 'type' => 'Manga',
'url' => 'https://kitsu.io/manga/love-hina', 'url' => 'https://kitsu.io/manga/love-hina',
)), )),
'reading_status' => 'current', 'reading_status' => 'current',
'notes' => '', 'notes' => '',
'rereading' => false, 'rereading' => false,
'reread' => 0, 'reread' => 0,
'user_rating' => 7.0, 'user_rating' => 7,
)), )),
2 => 2 =>
Aviat\AnimeClient\Types\MangaListItem::__set_state(array( Aviat\AnimeClient\Types\MangaListItem::__set_state(array(
@ -113,14 +113,14 @@
array ( array (
0 => 'Yamada-kun and the Seven Witches', 0 => 'Yamada-kun and the Seven Witches',
), ),
'type' => 'manga', 'type' => 'Manga',
'url' => 'https://kitsu.io/manga/yamada-kun-to-7-nin-no-majo', 'url' => 'https://kitsu.io/manga/yamada-kun-to-7-nin-no-majo',
)), )),
'reading_status' => 'current', 'reading_status' => 'current',
'notes' => '', 'notes' => '',
'rereading' => false, 'rereading' => false,
'reread' => 0, 'reread' => 0,
'user_rating' => 9.0, 'user_rating' => 9,
)), )),
3 => 3 =>
Aviat\AnimeClient\Types\MangaListItem::__set_state(array( Aviat\AnimeClient\Types\MangaListItem::__set_state(array(
@ -151,7 +151,7 @@
'titles' => 'titles' =>
array ( array (
), ),
'type' => 'manga', 'type' => 'Manga',
'url' => 'https://kitsu.io/manga/relife', 'url' => 'https://kitsu.io/manga/relife',
)), )),
'reading_status' => 'current', 'reading_status' => 'current',
@ -189,13 +189,13 @@
'titles' => 'titles' =>
array ( array (
), ),
'type' => 'manga', 'type' => 'Manga',
'url' => 'https://kitsu.io/manga/joshikausei', 'url' => 'https://kitsu.io/manga/joshikausei',
)), )),
'reading_status' => 'current', 'reading_status' => 'current',
'notes' => '', 'notes' => '',
'rereading' => false, 'rereading' => false,
'reread' => 0, 'reread' => 0,
'user_rating' => 8.0, 'user_rating' => 8,
)), )),
); );