diff --git a/tests/HttpV4/Controllers/AnimeControllerTest.php b/tests/HttpV4/Controllers/AnimeControllerTest.php index fb6cf9d..74b0db1 100644 --- a/tests/HttpV4/Controllers/AnimeControllerTest.php +++ b/tests/HttpV4/Controllers/AnimeControllerTest.php @@ -123,8 +123,7 @@ class AnimeControllerV4Test extends TestCase 'url', 'images' => [ 'jpg' => [ - 'image_url', - 'small_image_url', + 'image_url' ], 'webp' => [ 'image_url', @@ -189,6 +188,7 @@ class AnimeControllerV4Test extends TestCase 'title_japanese', 'title_romanji', 'aired', + 'score', 'filler', 'recap', 'forum_url' @@ -211,20 +211,13 @@ class AnimeControllerV4Test extends TestCase 'title_japanese', 'title_romanji', 'aired', + 'score', 'filler', 'recap', 'forum_url' ] ] - ]) - ->seeJsonContains([ - 'data' => [ - [ - 'mal_id' => 101, - 'title' => 'Showdown in a Heat Haze! Ace vs. the Gallant Scorpion!' - ] - ] - ]);; + ]); } public function testEpisode() @@ -415,14 +408,6 @@ class AnimeControllerV4Test extends TestCase 'is_spoiler', 'is_preliminary', 'episodes_watched', - 'scores' => [ - 'overall', - 'story', - 'animation', - 'sound', - 'character', - 'enjoyment' - ], 'user' => [ 'url', 'username', @@ -440,7 +425,7 @@ class AnimeControllerV4Test extends TestCase ]); $this->get('/v4/anime/1/reviews?page=100') - ->seeStatusCode(200) + ->seeStatusCode(404) ->seeJsonStructure([ 'pagination' => [ 'last_visible_page', diff --git a/tests/HttpV4/Controllers/MangaControllerTest.php b/tests/HttpV4/Controllers/MangaControllerTest.php index 589b158..d82a131 100644 --- a/tests/HttpV4/Controllers/MangaControllerTest.php +++ b/tests/HttpV4/Controllers/MangaControllerTest.php @@ -93,8 +93,7 @@ class MangaControllerV4Test extends TestCase 'url', 'images' => [ 'jpg' => [ - 'image_url', - 'small_image_url', + 'image_url' ], 'webp' => [ 'image_url', @@ -237,13 +236,6 @@ class MangaControllerV4Test extends TestCase 'is_spoiler', 'is_preliminary', 'chapters_read', - 'scores' => [ - 'overall', - 'story', - 'art', - 'character', - 'enjoyment' - ], 'user' => [ 'url', 'username', @@ -261,7 +253,7 @@ class MangaControllerV4Test extends TestCase ]); $this->get('/v4/manga/1/reviews?page=100') - ->seeStatusCode(200) + ->seeStatusCode(404) ->seeJsonStructure([ 'pagination' => [ 'last_visible_page', diff --git a/tests/HttpV4/Controllers/ProducerControllerTest.php b/tests/HttpV4/Controllers/ProducerControllerTest.php index 0e0d2e1..8f09661 100644 --- a/tests/HttpV4/Controllers/ProducerControllerTest.php +++ b/tests/HttpV4/Controllers/ProducerControllerTest.php @@ -10,8 +10,13 @@ class ProducerControllerTest extends TestCase ->seeJsonStructure(['data'=>[ [ 'mal_id', - 'name', 'url', + 'titles', + 'images', + 'count', + 'favorites', + 'established', + 'about', 'count' ] ]]); diff --git a/tests/HttpV4/Controllers/ScheduleControllerTest.php b/tests/HttpV4/Controllers/ScheduleControllerTest.php index 95334b5..09529ab 100644 --- a/tests/HttpV4/Controllers/ScheduleControllerTest.php +++ b/tests/HttpV4/Controllers/ScheduleControllerTest.php @@ -6,49 +6,82 @@ class ScheduleControllerTest extends TestCase { $this->get('/v4/schedules') ->seeStatusCode(200) - ->seeJsonStructure([ - 'monday' => [ - [ - 'mal_id', - 'url', - 'title', - 'synopsis', - 'type', - 'airing_start', - 'episodes', - 'members', - 'genres' => [ - [ - 'mal_id', - 'type', - 'name', - 'url' - ] - ], - 'source', - 'producers' => [ - [ - 'mal_id', - 'type', - 'name', - 'url' - ] - ], - 'score', - 'licensors', - 'r18', - 'kids' + ->seeJsonStructure(['data' => [ + 'mal_id', + 'url', + 'images' => [ + 'jpg' => [ + 'image_url', + 'small_image_url', + 'large_image_url' + ], + 'webp' => [ + 'image_url', + 'small_image_url', + 'large_image_url' + ], + ], + 'trailer' => [ + 'youtube_id', + 'url', + 'embed_url', + 'images' => [ + 'image_url', + 'small_image_url', + 'medium_image_url', + 'large_image_url', + 'maximum_image_url', ] ], - 'tuesday', - 'wednesday', - 'thursday', - 'friday', - 'saturday', - 'sunday', - 'other', - 'unknown' - ]); + 'title', + 'title_english', + 'title_japanese', + 'title_synonyms', + 'type', + 'source', + 'episodes', + 'status', + 'airing', + 'aired' => [ + 'from', + 'to', + 'prop' => [ + 'from' => [ + 'day', + 'month', + 'year' + ], + 'to' => [ + 'day', + 'month', + 'year' + ] + ], + 'string' + ], + 'duration', + 'rating', + 'score', + 'scored_by', + 'rank', + 'popularity', + 'members', + 'favorites', + 'synopsis', + 'background', + 'season', + 'year', + 'broadcast' => [ + 'day', + 'time', + 'timezone', + 'string' + ], + 'producers', + 'licensors', + 'studios', + 'genres', + ]]); } public function test400() diff --git a/tests/HttpV4/Controllers/UserControllerTest.php b/tests/HttpV4/Controllers/UserControllerTest.php index 6695a98..f57ad4f 100644 --- a/tests/HttpV4/Controllers/UserControllerTest.php +++ b/tests/HttpV4/Controllers/UserControllerTest.php @@ -306,12 +306,6 @@ class UserControllerTest extends TestCase ->seeStatusCode(200); } - public function testUserPrivateList() - { - $this->get('/v4/users/nekomata1037/mangalist?order_by=last_updated&sort=descending') - ->seeStatusCode(400); - } - public function testUserClubs() { $this->get('/v4/users/nekomata1037/clubs')