From d91665e3ae275f9febc0c38bd4596e6b6248c3a0 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Mon, 3 Apr 2017 14:46:29 -0400 Subject: [PATCH] More basic tests, see #16 --- src/API/Mapping/AnimeWatchingStatus.php | 7 +--- src/API/Mapping/MangaReadingStatus.php | 7 +--- .../Transformer/AnimeListTransformerTest.php | 39 +++++++++++++++++++ .../Transformer/MangaListTransformerTest.php | 39 +++++++++++++++++++ 4 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 tests/API/MAL/Transformer/AnimeListTransformerTest.php create mode 100644 tests/API/MAL/Transformer/MangaListTransformerTest.php diff --git a/src/API/Mapping/AnimeWatchingStatus.php b/src/API/Mapping/AnimeWatchingStatus.php index 34b44930..0017775c 100644 --- a/src/API/Mapping/AnimeWatchingStatus.php +++ b/src/API/Mapping/AnimeWatchingStatus.php @@ -16,12 +16,7 @@ namespace Aviat\AnimeClient\API\Mapping; -use Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\{ - Kitsu, - MAL, - Route, - Title -}; +use Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\{Kitsu, MAL, Route, Title}; use Aviat\Ion\Enum; /** diff --git a/src/API/Mapping/MangaReadingStatus.php b/src/API/Mapping/MangaReadingStatus.php index 363483da..c509a0bb 100644 --- a/src/API/Mapping/MangaReadingStatus.php +++ b/src/API/Mapping/MangaReadingStatus.php @@ -16,12 +16,7 @@ namespace Aviat\AnimeClient\API\Mapping; -use Aviat\AnimeClient\API\Enum\MangaReadingStatus\{ - Kitsu, - MAL, - Title, - Route -}; +use Aviat\AnimeClient\API\Enum\MangaReadingStatus\{Kitsu, MAL, Title, Route}; use Aviat\Ion\Enum; /** diff --git a/tests/API/MAL/Transformer/AnimeListTransformerTest.php b/tests/API/MAL/Transformer/AnimeListTransformerTest.php new file mode 100644 index 00000000..bc5007ea --- /dev/null +++ b/tests/API/MAL/Transformer/AnimeListTransformerTest.php @@ -0,0 +1,39 @@ + + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient + */ + +namespace Aviat\AnimeClient\Tests\API\MAL\Transformer; + +use Aviat\AnimeClient\API\MAL\Transformer\AnimeListTransformer; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; +use Aviat\Ion\Friend; +use Aviat\Ion\Json; + +class AnimeListTransformerTest extends AnimeClientTestCase { + + protected $transformer; + + public function setUp() + { + parent::setUp(); + $this->transformer = new AnimeListTransformer(); + } + + public function testTransform() + { + $this->assertEquals([], $this->transformer->transform([])); + } + +} \ No newline at end of file diff --git a/tests/API/MAL/Transformer/MangaListTransformerTest.php b/tests/API/MAL/Transformer/MangaListTransformerTest.php new file mode 100644 index 00000000..6a6a6196 --- /dev/null +++ b/tests/API/MAL/Transformer/MangaListTransformerTest.php @@ -0,0 +1,39 @@ + + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient + */ + +namespace Aviat\AnimeClient\Tests\API\MAL\Transformer; + +use Aviat\AnimeClient\API\MAL\Transformer\MangaListTransformer; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; +use Aviat\Ion\Friend; +use Aviat\Ion\Json; + +class MangaListTransformerTest extends AnimeClientTestCase { + + protected $transformer; + + public function setUp() + { + parent::setUp(); + $this->transformer = new MangaListTransformer(); + } + + public function testTransform() + { + $this->assertEquals([], $this->transformer->transform([])); + } + +} \ No newline at end of file