Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
18 changed files with 47 additions and 21 deletions
Showing only changes of commit 30b398c946 - Show all commits

View File

@ -17,8 +17,9 @@
namespace Aviat\AnimeClient\Tests\API; namespace Aviat\AnimeClient\Tests\API;
use Aviat\AnimeClient\API\CacheTrait; use Aviat\AnimeClient\API\CacheTrait;
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
class CacheTraitTest extends \AnimeClient_TestCase { class CacheTraitTest extends AnimeClient_TestCase {
public function setUp() public function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -16,8 +16,8 @@
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
use AnimeClient_TestCase;
use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer;
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
use Aviat\Ion\Friend; use Aviat\Ion\Friend;
use Aviat\Ion\Json; use Aviat\Ion\Json;

View File

@ -16,8 +16,8 @@
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
use AnimeClient_TestCase;
use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer;
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
use Aviat\Ion\Friend; use Aviat\Ion\Friend;
use Aviat\Ion\Json; use Aviat\Ion\Json;

View File

@ -16,9 +16,9 @@
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
use AnimeClient_TestCase;
use Aviat\AnimeClient\API\JsonAPI; use Aviat\AnimeClient\API\JsonAPI;
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer;
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
use Aviat\Ion\Json; use Aviat\Ion\Json;
class MangaListTransformerTest extends AnimeClient_TestCase { class MangaListTransformerTest extends AnimeClient_TestCase {

View File

@ -16,9 +16,9 @@
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
use AnimeClient_TestCase;
use Aviat\AnimeClient\API\JsonAPI; use Aviat\AnimeClient\API\JsonAPI;
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer;
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
use Aviat\Ion\Json; use Aviat\Ion\Json;
class MangaTransformerTest extends AnimeClient_TestCase { class MangaTransformerTest extends AnimeClient_TestCase {

View File

@ -1,13 +1,13 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
class AnimeClientTest extends AnimeClient_TestCase { class AnimeClientTest extends AnimeClient_TestCase {
/** /**
* Basic sanity test for _dir function * Basic sanity test for _dir function
*/ */
public function testDir() public function testDir()
{ {
$this->assertEquals('foo' . DIRECTORY_SEPARATOR . 'bar', \_dir('foo', 'bar')); $this->assertEquals('foo' . \DIRECTORY_SEPARATOR . 'bar', \_dir('foo', 'bar'));
} }
} }

View File

@ -1,5 +1,7 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use const Aviat\AnimeClient\SRC_DIR; use const Aviat\AnimeClient\SRC_DIR;
use Aura\Web\WebFactory; use Aura\Web\WebFactory;

View File

@ -1,6 +1,9 @@
<?php <?php
namespace Aviat\AnimeClient\Tests\Command;
use Aviat\AnimeClient\Command\BaseCommand; use Aviat\AnimeClient\Command\BaseCommand;
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
use Aviat\Ion\Friend; use Aviat\Ion\Friend;
use ConsoleKit\Console; use ConsoleKit\Console;

View File

@ -1,4 +1,7 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace Aviat\AnimeClient\Tests;
use Aura\Router\RouterFactory; use Aura\Router\RouterFactory;
use Aura\Web\WebFactory; use Aura\Web\WebFactory;
use Aviat\AnimeClient\Controller; use Aviat\AnimeClient\Controller;

View File

@ -1,5 +1,7 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use Aviat\AnimeClient\Dispatcher; use Aviat\AnimeClient\Dispatcher;
use Aviat\AnimeClient\UrlGenerator; use Aviat\AnimeClient\UrlGenerator;
use Aviat\Ion\Config; use Aviat\Ion\Config;
@ -53,7 +55,7 @@ class DispatcherTest extends AnimeClient_TestCase {
public function dataRoute() public function dataRoute()
{ {
$default_config = array( $default_config = [
'routes' => [ 'routes' => [
'routes' => [ 'routes' => [
'login_form' => [ 'login_form' => [
@ -88,33 +90,33 @@ class DispatcherTest extends AnimeClient_TestCase {
'default_list' => 'anime' 'default_list' => 'anime'
] ]
], ],
); ];
$data = [ $data = [
'anime_default_routing_manga' => array( 'anime_default_routing_manga' => [
'config' => $default_config, 'config' => $default_config,
'controller' => 'manga', 'controller' => 'manga',
'host' => "localhost", 'host' => "localhost",
'uri' => "/manga/plan_to_read", 'uri' => "/manga/plan_to_read",
), ],
'manga_default_routing_anime' => array( 'manga_default_routing_anime' => [
'config' => $default_config, 'config' => $default_config,
'controller' => 'anime', 'controller' => 'anime',
'host' => "localhost", 'host' => "localhost",
'uri' => "/anime/watching", 'uri' => "/anime/watching",
), ],
'anime_default_routing_anime' => array( 'anime_default_routing_anime' => [
'config' => $default_config, 'config' => $default_config,
'controller' => 'anime', 'controller' => 'anime',
'host' => 'localhost', 'host' => 'localhost',
'uri' => '/anime/watching', 'uri' => '/anime/watching',
), ],
'manga_default_routing_manga' => array( 'manga_default_routing_manga' => [
'config' => $default_config, 'config' => $default_config,
'controller' => 'manga', 'controller' => 'manga',
'host' => 'localhost', 'host' => 'localhost',
'uri' => '/manga/plan_to_read' 'uri' => '/manga/plan_to_read'
) ]
]; ];
$data['manga_default_routing_anime']['config']['routes']['route_config']['default_list'] = 'manga'; $data['manga_default_routing_anime']['config']['routes']['route_config']['default_list'] = 'manga';

View File

@ -1,5 +1,7 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use Aviat\AnimeClient\Helper\Menu as MenuHelper; use Aviat\AnimeClient\Helper\Menu as MenuHelper;
class MenuHelperTest extends AnimeClient_TestCase { class MenuHelperTest extends AnimeClient_TestCase {

View File

@ -1,4 +1,7 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use Aviat\AnimeClient\MenuGenerator; use Aviat\AnimeClient\MenuGenerator;
use Aviat\Ion\Friend; use Aviat\Ion\Friend;

View File

@ -1,5 +1,9 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use PDO;
class RequirementsTest extends AnimeClient_TestCase { class RequirementsTest extends AnimeClient_TestCase {
public function testPHPVersion() public function testPHPVersion()

View File

@ -1,5 +1,7 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use Aviat\AnimeClient\RoutingBase; use Aviat\AnimeClient\RoutingBase;
class RoutingBaseTest extends AnimeClient_TestCase { class RoutingBaseTest extends AnimeClient_TestCase {

View File

@ -1,6 +1,8 @@
<?php <?php
class TestSessionHandler implements SessionHandlerInterface { namespace Aviat\AnimeClient\Tests;
class TestSessionHandler implements \SessionHandlerInterface {
public $data = []; public $data = [];
public $save_path = './test_data/sessions'; public $save_path = './test_data/sessions';

View File

@ -1,5 +1,7 @@
<?php <?php
namespace Aviat\AnimeClient\Tests;
use Aviat\AnimeClient\UrlGenerator; use Aviat\AnimeClient\UrlGenerator;
use Aviat\Ion\Config; use Aviat\Ion\Config;

View File

@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests;
use Aviat\AnimeClient\Util; use Aviat\AnimeClient\Util;
class UtilTest extends \AnimeClient_TestCase { class UtilTest extends AnimeClient_TestCase {
public function setUp() public function setUp()
{ {