From aace368b241bed2e91416cf9ea18abb02f4e9228 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 26 Aug 2020 15:22:14 -0400 Subject: [PATCH] Move Kitsu class out of API namespace --- app/views/anime/details.php | 2 +- app/views/anime/list.php | 4 +- app/views/character/details.php | 2 +- app/views/collection/list.php | 4 +- app/views/person/details.php | 2 +- app/views/user/details.php | 2 +- src/AnimeClient/API/Kitsu/AnimeTrait.php | 4 +- src/AnimeClient/API/Kitsu/Auth.php | 6 +- src/AnimeClient/API/Kitsu/MangaTrait.php | 4 +- src/AnimeClient/API/Kitsu/Model.php | 2 +- src/AnimeClient/API/Kitsu/RequestBuilder.php | 2 +- .../Transformer/AnimeListTransformer.php | 2 +- .../Kitsu/Transformer/AnimeTransformer.php | 2 +- .../Transformer/CharacterTransformer.php | 2 +- .../Transformer/LibraryEntryTransformer.php | 2 +- .../Transformer/MangaListTransformer.php | 2 +- .../Kitsu/Transformer/MangaTransformer.php | 2 +- .../API/Kitsu/Transformer/UserTransformer.php | 2 +- src/AnimeClient/AnimeClient.php | 70 +++--- src/AnimeClient/Command/CachePrime.php | 2 +- src/AnimeClient/Command/SyncLists.php | 5 +- .../Controller/MangaCollection.php | 205 ------------------ src/AnimeClient/{API => }/Kitsu.php | 2 +- src/AnimeClient/Model/MangaCollection.php | 43 ---- tests/AnimeClient/ControllerTest.php | 6 +- tests/AnimeClient/{API => }/KitsuTest.php | 2 +- 26 files changed, 62 insertions(+), 321 deletions(-) delete mode 100644 src/AnimeClient/Controller/MangaCollection.php rename src/AnimeClient/{API => }/Kitsu.php (99%) delete mode 100644 src/AnimeClient/Model/MangaCollection.php rename tests/AnimeClient/{API => }/KitsuTest.php (97%) diff --git a/app/views/anime/details.php b/app/views/anime/details.php index 77fac541..72b1f8ca 100644 --- a/app/views/anime/details.php +++ b/app/views/anime/details.php @@ -1,6 +1,6 @@ diff --git a/app/views/anime/list.php b/app/views/anime/list.php index 1c2d482b..ae4a5613 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -1,4 +1,4 @@ - +
isAuthenticated()): ?> Add Item @@ -15,7 +15,7 @@

There's nothing here!

diff --git a/app/views/character/details.php b/app/views/character/details.php index b047b6cb..d4db6384 100644 --- a/app/views/character/details.php +++ b/app/views/character/details.php @@ -1,7 +1,7 @@
diff --git a/app/views/collection/list.php b/app/views/collection/list.php index 092d307c..3fa1be75 100644 --- a/app/views/collection/list.php +++ b/app/views/collection/list.php @@ -1,4 +1,4 @@ - +
isAuthenticated()): ?> Add Item @@ -12,7 +12,7 @@
$items): ?> - +
diff --git a/app/views/person/details.php b/app/views/person/details.php index e2b1f935..b2c20a28 100644 --- a/app/views/person/details.php +++ b/app/views/person/details.php @@ -1,6 +1,6 @@
diff --git a/app/views/user/details.php b/app/views/user/details.php index db0f8a8c..bca971a1 100644 --- a/app/views/user/details.php +++ b/app/views/user/details.php @@ -1,5 +1,5 @@

diff --git a/src/AnimeClient/API/Kitsu/AnimeTrait.php b/src/AnimeClient/API/Kitsu/AnimeTrait.php index c5d26512..dc50309b 100644 --- a/src/AnimeClient/API/Kitsu/AnimeTrait.php +++ b/src/AnimeClient/API/Kitsu/AnimeTrait.php @@ -17,9 +17,9 @@ namespace Aviat\AnimeClient\API\Kitsu; use Amp\Http\Client\Request; +use Aviat\AnimeClient\Kitsu as K; use Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\Kitsu as KitsuWatchingStatus; use Aviat\AnimeClient\API\JsonAPI; -use Aviat\AnimeClient\API\Kitsu as K; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeHistoryTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer; @@ -100,7 +100,7 @@ trait AnimeTrait { if ($list === NULL) { - $raw = $this->getRawHistoryList('anime'); + $raw = $this->getRawHistoryList(); $list = (new AnimeHistoryTransformer())->transform($raw); diff --git a/src/AnimeClient/API/Kitsu/Auth.php b/src/AnimeClient/API/Kitsu/Auth.php index 3403e0e5..5a995af2 100644 --- a/src/AnimeClient/API/Kitsu/Auth.php +++ b/src/AnimeClient/API/Kitsu/Auth.php @@ -20,10 +20,8 @@ use Aura\Session\Segment; use const Aviat\AnimeClient\SESSION_SEGMENT; -use Aviat\AnimeClient\API\{ - CacheTrait, - Kitsu as K -}; +use Aviat\AnimeClient\Kitsu as K; +use Aviat\AnimeClient\API\CacheTrait; use Aviat\Ion\Di\{ContainerAware, ContainerInterface}; use Aviat\Ion\Di\Exception\{ContainerException, NotFoundException}; use Aviat\Ion\Event; diff --git a/src/AnimeClient/API/Kitsu/MangaTrait.php b/src/AnimeClient/API/Kitsu/MangaTrait.php index 6f11ec09..ef2b15fa 100644 --- a/src/AnimeClient/API/Kitsu/MangaTrait.php +++ b/src/AnimeClient/API/Kitsu/MangaTrait.php @@ -17,9 +17,9 @@ namespace Aviat\AnimeClient\API\Kitsu; use Amp\Http\Client\Request; +use Aviat\AnimeClient\Kitsu as K; use Aviat\AnimeClient\API\Enum\MangaReadingStatus\Kitsu as KitsuReadingStatus; use Aviat\AnimeClient\API\JsonAPI; -use Aviat\AnimeClient\API\Kitsu as K; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaHistoryTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer; @@ -96,7 +96,7 @@ trait MangaTrait { if ($list === NULL) { - $raw = $this->getRawHistoryList('manga'); + $raw = $this->getRawHistoryList(); $list = (new MangaHistoryTransformer())->transform($raw); $this->cache->set($key, $list); diff --git a/src/AnimeClient/API/Kitsu/Model.php b/src/AnimeClient/API/Kitsu/Model.php index 76fdce86..45907948 100644 --- a/src/AnimeClient/API/Kitsu/Model.php +++ b/src/AnimeClient/API/Kitsu/Model.php @@ -19,10 +19,10 @@ namespace Aviat\AnimeClient\API\Kitsu; use function Amp\Promise\wait; use Amp\Http\Client\Request; +use Aviat\AnimeClient\Kitsu as K; use Aviat\AnimeClient\API\{ CacheTrait, JsonAPI, - Kitsu as K, ParallelAPIRequest }; use Aviat\AnimeClient\API\Kitsu\Transformer\{ diff --git a/src/AnimeClient/API/Kitsu/RequestBuilder.php b/src/AnimeClient/API/Kitsu/RequestBuilder.php index 586efb27..e103c42a 100644 --- a/src/AnimeClient/API/Kitsu/RequestBuilder.php +++ b/src/AnimeClient/API/Kitsu/RequestBuilder.php @@ -24,9 +24,9 @@ use function Aviat\AnimeClient\getResponse; use Amp\Http\Client\Request; use Amp\Http\Client\Response; +use Aviat\AnimeClient\Kitsu as K; use Aviat\AnimeClient\API\APIRequestBuilder; use Aviat\AnimeClient\API\FailedResponseException; -use Aviat\AnimeClient\API\Kitsu as K; use Aviat\AnimeClient\Enum\EventType; use Aviat\Ion\Di\ContainerAware; use Aviat\Ion\Di\ContainerInterface; diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php index 0bd3f81d..078b8105 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\Types\{ FormItem, AnimeListItem diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php index c2f022f7..3a007c17 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\Types\AnimePage; use Aviat\Ion\Transformer\AbstractTransformer; diff --git a/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php index 168b9839..42f73e5b 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\Types\Character; use Aviat\Ion\Transformer\AbstractTransformer; diff --git a/src/AnimeClient/API/Kitsu/Transformer/LibraryEntryTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/LibraryEntryTransformer.php index 47e10586..269fedec 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/LibraryEntryTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/LibraryEntryTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\Types\{FormItem, AnimeListItem, MangaListItem, MangaListItemDetail}; use Aviat\Ion\Transformer\AbstractTransformer; use Aviat\Ion\Type\StringType; diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php index 41b0f913..435faf34 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\Types\{ FormItem, FormItemData, MangaListItem, MangaListItemDetail diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php index d2e82af2..350a4486 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\Types\MangaPage; use Aviat\Ion\Transformer\AbstractTransformer; diff --git a/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php index 30fd38b0..e9e42ba5 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use function Aviat\AnimeClient\getLocalImg; use Aviat\AnimeClient\Types\User; diff --git a/src/AnimeClient/AnimeClient.php b/src/AnimeClient/AnimeClient.php index c1932ccd..eb35e2f9 100644 --- a/src/AnimeClient/AnimeClient.php +++ b/src/AnimeClient/AnimeClient.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Psr\SimpleCache\CacheInterface; use Psr\SimpleCache\InvalidArgumentException; use function Amp\Promise\wait; @@ -83,43 +83,6 @@ function loadTomlFile(string $filename): array return Toml::parseFile($filename); } -/** - * Recursively create a toml file from a data array - * - * @param TomlBuilder $builder - * @param iterable $data - * @param null $parentKey - */ -function _iterateToml(TomlBuilder $builder, iterable $data, $parentKey = NULL): void -{ - foreach ($data as $key => $value) - { - if ($value === NULL) - { - continue; - } - - - if (is_scalar($value) || isSequentialArray($value)) - { - // $builder->addTable(''); - $builder->addValue($key, $value); - continue; - } - - $newKey = ($parentKey !== NULL) - ? "{$parentKey}.{$key}" - : $key; - - if ( ! isSequentialArray($value)) - { - $builder->addTable($newKey); - } - - _iterateToml($builder, $value, $newKey); - } -} - /** * Serialize config data into a Toml file * @@ -129,6 +92,35 @@ function _iterateToml(TomlBuilder $builder, iterable $data, $parentKey = NULL): function arrayToToml(iterable $data): string { $builder = new TomlBuilder(); + function _iterateToml(TomlBuilder $builder, iterable $data, $parentKey = NULL): void + { + foreach ($data as $key => $value) + { + if ($value === NULL) + { + continue; + } + + + if (is_scalar($value) || isSequentialArray($value)) + { + // $builder->addTable(''); + $builder->addValue($key, $value); + continue; + } + + $newKey = ($parentKey !== NULL) + ? "{$parentKey}.{$key}" + : $key; + + if ( ! isSequentialArray($value)) + { + $builder->addTable($newKey); + } + + _iterateToml($builder, $value, $newKey); + } + } _iterateToml($builder, $data); @@ -346,7 +338,7 @@ function createPlaceholderImage ($path, ?int $width, ?int $height, $text = 'Imag * @param string $key * @return bool */ -function col_not_empty(array $search, string $key): bool +function colNotEmpty(array $search, string $key): bool { $items = array_filter(array_column($search, $key), fn ($x) => ( ! empty($x))); return count($items) > 0; diff --git a/src/AnimeClient/Command/CachePrime.php b/src/AnimeClient/Command/CachePrime.php index fc89fcf8..ea44076c 100644 --- a/src/AnimeClient/Command/CachePrime.php +++ b/src/AnimeClient/Command/CachePrime.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\Command; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\Ion\Di\Exception\ContainerException; use Aviat\Ion\Di\Exception\NotFoundException; use function Aviat\AnimeClient\clearCache; diff --git a/src/AnimeClient/Command/SyncLists.php b/src/AnimeClient/Command/SyncLists.php index 63daeef4..d16fc9c5 100644 --- a/src/AnimeClient/Command/SyncLists.php +++ b/src/AnimeClient/Command/SyncLists.php @@ -26,7 +26,6 @@ use Aviat\AnimeClient\API\{ }; use Aviat\AnimeClient\API; use Aviat\AnimeClient\API\Anilist; -use Aviat\AnimeClient\API\Kitsu; use Aviat\AnimeClient\API\Mapping\{AnimeWatchingStatus, MangaReadingStatus}; use Aviat\AnimeClient\Enum\{APISource, ListType, SyncAction}; use Aviat\AnimeClient\Types\FormItem; @@ -50,9 +49,9 @@ final class SyncLists extends BaseCommand { /** * Model for making requests to Kitsu API - * @var Kitsu\Model + * @var API\Kitsu\Model */ - private Kitsu\Model $kitsuModel; + private API\Kitsu\Model $kitsuModel; /** * Does the Kitsu API have valid authentication? diff --git a/src/AnimeClient/Controller/MangaCollection.php b/src/AnimeClient/Controller/MangaCollection.php deleted file mode 100644 index 40bf3102..00000000 --- a/src/AnimeClient/Controller/MangaCollection.php +++ /dev/null @@ -1,205 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5.1 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\AnimeClient\Controller; - -use Aura\Router\Exception\RouteNotFound; -use Aviat\AnimeClient\Controller as BaseController; -use Aviat\Ion\Di\Exception\ContainerException; -use Aviat\Ion\Di\Exception\NotFoundException; -use Aviat\Ion\Exception\DoubleRenderException; -use Aviat\AnimeClient\Model\{ - Manga as MangaModel, - MangaCollection as MangaCollectionModel -}; -use Aviat\Ion\Di\ContainerInterface; - -use InvalidArgumentException; - -/** - * Controller for manga collection pages - */ -final class MangaCollection extends BaseController { - - /** - * The manga collection model - * @var MangaCollectionModel $mangaCollectionModel - */ - private $mangaCollectionModel; - - /** - * The manga API model - * @var MangaModel $mangaModel - */ - private $mangaModel; - - /** - * Constructor - * - * @param ContainerInterface $container - * @throws ContainerException - * @throws NotFoundException - * @throws \InvalidArgumentException - */ - public function __construct(ContainerInterface $container) - { - parent::__construct($container); - - $this->mangaModel = $container->get('manga-model'); - $this->mangaCollectionModel = $container->get('manga-collection-model'); - $this->baseData = array_merge($this->baseData, [ - 'collection_type' => 'manga', - 'menu_name' => 'manga-collection', - 'other_type' => 'anime', - 'url_type' => 'manga', - ]); - } - - /** - * Search for manga - * - * @throws DoubleRenderException - * @return void - */ - public function search(): void - { - $queryParams = $this->request->getQueryParams(); - $query = $queryParams['query']; - $this->outputJSON($this->mangaModel->search($query)); - } - - /** - * Show the manga collection page - * - * @param string $view - * @throws ContainerException - * @throws NotFoundException - * @throws InvalidArgumentException - * @return void - */ - public function index($view): void - { - $viewMap = [ - '' => 'cover', - 'list' => 'list' - ]; - - $data = $this->mangaCollectionModel->getCollection(); - - $this->outputHTML('collection/' . $viewMap[$view], [ - 'title' => $this->config->get('whose_list') . "'s Manga Collection", - 'sections' => $data, - 'genres' => $this->mangaCollectionModel->getGenreList() - ]); - } - - /** - * Show the manga collection add/edit form - * - * @param integer|null $id - * @throws ContainerException - * @throws NotFoundException - * @throws RouteNotFound - * @throws InvalidArgumentException - * @return void - */ - public function form($id = NULL): void - { - $this->setSessionRedirect(); - - $action = $id === NULL ? 'Add' : 'Edit'; - $urlAction = strtolower($action); - - $this->outputHTML('collection/' . $urlAction, [ - 'action' => $action, - 'action_url' => $this->url->generate("manga.collection.{$urlAction}.post"), - 'title' => $this->formatTitle( - $this->config->get('whose_list') . "'s manga Collection", - $action - ), - 'media_items' => $this->mangaCollectionModel->getMediaTypeList(), - 'item' => ($action === 'Edit') ? $this->mangaCollectionModel->get($id) : [] - ]); - } - - /** - * Update a collection item - * - * @throws ContainerException - * @throws NotFoundException - * @throws InvalidArgumentException - * @return void - */ - public function edit(): void - { - $data = $this->request->getParsedBody(); - if (array_key_exists('hummingbird_id', $data)) - { - $this->mangaCollectionModel->update($data); - $this->setFlashMessage('Successfully updated collection item.', 'success'); - } - else - { - $this->setFlashMessage('Failed to update collection item', 'error'); - } - - $this->sessionRedirect(); - } - - /** - * Add a collection item - * - * @throws ContainerException - * @throws NotFoundException - * @throws InvalidArgumentException - * @return void - */ - public function add(): void - { - $data = $this->request->getParsedBody(); - if (array_key_exists('id', $data)) - { - $this->mangaCollectionModel->add($data); - $this->setFlashMessage('Successfully added collection item', 'success'); - } - else - { - $this->setFlashMessage('Failed to add collection item.', 'error'); - } - - $this->sessionRedirect(); - } - - /** - * Remove a collection item - * - * @return void - */ - public function delete(): void - { - $data = $this->request->getParsedBody(); - if ( ! array_key_exists('hummingbird_id', $data)) - { - $this->redirect('/manga-collection/view', 303); - } - - $this->mangaCollectionModel->delete($data); - $this->setFlashMessage('Successfully removed manga from collection.', 'success'); - - $this->redirect('/manga-collection/view', 303); - } -} -// End of CollectionController.php \ No newline at end of file diff --git a/src/AnimeClient/API/Kitsu.php b/src/AnimeClient/Kitsu.php similarity index 99% rename from src/AnimeClient/API/Kitsu.php rename to src/AnimeClient/Kitsu.php index 08ecf1e8..c2f7d261 100644 --- a/src/AnimeClient/API/Kitsu.php +++ b/src/AnimeClient/Kitsu.php @@ -14,7 +14,7 @@ * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ -namespace Aviat\AnimeClient\API; +namespace Aviat\AnimeClient; use Aviat\AnimeClient\API\Kitsu\Enum\AnimeAiringStatus; use Aviat\AnimeClient\API\Kitsu\Enum\MangaPublishingStatus; diff --git a/src/AnimeClient/Model/MangaCollection.php b/src/AnimeClient/Model/MangaCollection.php deleted file mode 100644 index fa36f6e3..00000000 --- a/src/AnimeClient/Model/MangaCollection.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5.1 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\AnimeClient\Model; - -use Aviat\Ion\Di\ContainerInterface; - -/** - * Model for getting anime collection data - */ -final class MangaCollection extends Collection { - - /** - * Manga API Model - * @var Manga $mangaModel - */ - protected $mangaModel; - - /** - * Create the collection model - * - * @param ContainerInterface $container - */ - public function __construct(ContainerInterface $container) - { - parent::__construct($container); - $this->mangaModel = $container->get('manga-model'); - } -} -// End of MangaCollectionModel.php \ No newline at end of file diff --git a/tests/AnimeClient/ControllerTest.php b/tests/AnimeClient/ControllerTest.php index 71c25fc6..723c38be 100644 --- a/tests/AnimeClient/ControllerTest.php +++ b/tests/AnimeClient/ControllerTest.php @@ -23,7 +23,7 @@ use Aviat\AnimeClient\Controller\{ Anime as AnimeController, Character as CharacterController, AnimeCollection as AnimeCollectionController, - MangaCollection as MangaCollectionController, + // MangaCollection as MangaCollectionController, Manga as MangaController }; @@ -73,10 +73,10 @@ class ControllerTest extends AnimeClientTestCase { Controller::class, new AnimeCollectionController($this->container) ); - $this->assertInstanceOf( + /* $this->assertInstanceOf( Controller::class, new MangaCollectionController($this->container) - ); + ); */ } public function testBaseControllerSanity() diff --git a/tests/AnimeClient/API/KitsuTest.php b/tests/AnimeClient/KitsuTest.php similarity index 97% rename from tests/AnimeClient/API/KitsuTest.php rename to tests/AnimeClient/KitsuTest.php index 1fa0d7b1..5ca24b9b 100644 --- a/tests/AnimeClient/API/KitsuTest.php +++ b/tests/AnimeClient/KitsuTest.php @@ -16,7 +16,7 @@ namespace Aviat\AnimeClient\Tests\API; -use Aviat\AnimeClient\API\Kitsu; +use Aviat\AnimeClient\Kitsu; use Aviat\AnimeClient\API\Kitsu\Enum\AnimeAiringStatus; use PHPUnit\Framework\TestCase;