Properly namespace all the tests
This commit is contained in:
parent
d94a280437
commit
36874cbe55
@ -17,8 +17,9 @@
|
||||
namespace Aviat\AnimeClient\Tests\API;
|
||||
|
||||
use Aviat\AnimeClient\API\CacheTrait;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
|
||||
class CacheTraitTest extends \AnimeClient_TestCase {
|
||||
class CacheTraitTest extends AnimeClient_TestCase {
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\Ion\Friend;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\Ion\Friend;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\API\JsonAPI;
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
class MangaListTransformerTest extends AnimeClient_TestCase {
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\API\JsonAPI;
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
class MangaTransformerTest extends AnimeClient_TestCase {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
class AnimeClientTest extends AnimeClient_TestCase {
|
||||
|
||||
/**
|
||||
* Basic sanity test for _dir function
|
||||
*/
|
||||
public function testDir()
|
||||
{
|
||||
$this->assertEquals('foo' . DIRECTORY_SEPARATOR . 'bar', \_dir('foo', 'bar'));
|
||||
$this->assertEquals('foo' . \DIRECTORY_SEPARATOR . 'bar', \_dir('foo', 'bar'));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use const Aviat\AnimeClient\SRC_DIR;
|
||||
|
||||
use Aura\Web\WebFactory;
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests\Command;
|
||||
|
||||
use Aviat\AnimeClient\Command\BaseCommand;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\Ion\Friend;
|
||||
use ConsoleKit\Console;
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aura\Router\RouterFactory;
|
||||
use Aura\Web\WebFactory;
|
||||
use Aviat\AnimeClient\Controller;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\Dispatcher;
|
||||
use Aviat\AnimeClient\UrlGenerator;
|
||||
use Aviat\Ion\Config;
|
||||
@ -53,7 +55,7 @@ class DispatcherTest extends AnimeClient_TestCase {
|
||||
|
||||
public function dataRoute()
|
||||
{
|
||||
$default_config = array(
|
||||
$default_config = [
|
||||
'routes' => [
|
||||
'routes' => [
|
||||
'login_form' => [
|
||||
@ -88,33 +90,33 @@ class DispatcherTest extends AnimeClient_TestCase {
|
||||
'default_list' => 'anime'
|
||||
]
|
||||
],
|
||||
);
|
||||
];
|
||||
|
||||
$data = [
|
||||
'anime_default_routing_manga' => array(
|
||||
'anime_default_routing_manga' => [
|
||||
'config' => $default_config,
|
||||
'controller' => 'manga',
|
||||
'host' => "localhost",
|
||||
'uri' => "/manga/plan_to_read",
|
||||
),
|
||||
'manga_default_routing_anime' => array(
|
||||
],
|
||||
'manga_default_routing_anime' => [
|
||||
'config' => $default_config,
|
||||
'controller' => 'anime',
|
||||
'host' => "localhost",
|
||||
'uri' => "/anime/watching",
|
||||
),
|
||||
'anime_default_routing_anime' => array(
|
||||
],
|
||||
'anime_default_routing_anime' => [
|
||||
'config' => $default_config,
|
||||
'controller' => 'anime',
|
||||
'host' => 'localhost',
|
||||
'uri' => '/anime/watching',
|
||||
),
|
||||
'manga_default_routing_manga' => array(
|
||||
],
|
||||
'manga_default_routing_manga' => [
|
||||
'config' => $default_config,
|
||||
'controller' => 'manga',
|
||||
'host' => 'localhost',
|
||||
'uri' => '/manga/plan_to_read'
|
||||
)
|
||||
]
|
||||
];
|
||||
|
||||
$data['manga_default_routing_anime']['config']['routes']['route_config']['default_list'] = 'manga';
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\Helper\Menu as MenuHelper;
|
||||
|
||||
class MenuHelperTest extends AnimeClient_TestCase {
|
||||
|
@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\MenuGenerator;
|
||||
use Aviat\Ion\Friend;
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use PDO;
|
||||
|
||||
class RequirementsTest extends AnimeClient_TestCase {
|
||||
|
||||
public function testPHPVersion()
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\RoutingBase;
|
||||
|
||||
class RoutingBaseTest extends AnimeClient_TestCase {
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
class TestSessionHandler implements SessionHandlerInterface {
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
class TestSessionHandler implements \SessionHandlerInterface {
|
||||
|
||||
public $data = [];
|
||||
public $save_path = './test_data/sessions';
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\UrlGenerator;
|
||||
use Aviat\Ion\Config;
|
||||
|
||||
|
@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\Util;
|
||||
|
||||
class UtilTest extends \AnimeClient_TestCase {
|
||||
class UtilTest extends AnimeClient_TestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
|
@ -37,8 +37,8 @@ require _dir(__DIR__, '../vendor/autoload.php');
|
||||
// Ini Settings
|
||||
// -----------------------------------------------------------------------------
|
||||
ini_set('session.use_cookies', 0);
|
||||
ini_set("session.use_only_cookies",0);
|
||||
ini_set("session.use_trans_sid",1);
|
||||
ini_set("session.use_only_cookies", 0);
|
||||
ini_set("session.use_trans_sid", 1);
|
||||
// Start session here to supress error about headers not sent
|
||||
session_start();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user