Rename test base class
This commit is contained in:
parent
365da603fa
commit
dfdc06d048
@ -17,9 +17,9 @@
|
||||
namespace Aviat\AnimeClient\Tests\API;
|
||||
|
||||
use Aviat\AnimeClient\API\CacheTrait;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\Tests\AnimeClientTestCase;
|
||||
|
||||
class CacheTraitTest extends AnimeClient_TestCase {
|
||||
class CacheTraitTest extends AnimeClientTestCase {
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
@ -17,16 +17,16 @@
|
||||
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\Tests\AnimeClientTestCase;
|
||||
use Aviat\Ion\Friend;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
class AnimeListTransformerTest extends AnimeClient_TestCase {
|
||||
class AnimeListTransformerTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
$this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
|
||||
$this->beforeTransform = Json::decodeFile("{$this->dir}/animeListItemBeforeTransform.json");
|
||||
$this->afterTransform = Json::decodeFile("{$this->dir}/animeListItemAfterTransform.json");
|
||||
|
@ -17,16 +17,16 @@
|
||||
namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\Tests\AnimeClientTestCase;
|
||||
use Aviat\Ion\Friend;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
class AnimeTransformerTest extends AnimeClient_TestCase {
|
||||
class AnimeTransformerTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
$this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
|
||||
$this->beforeTransform = Json::decodeFile("{$this->dir}/animeBeforeTransform.json");
|
||||
$this->afterTransform = Json::decodeFile("{$this->dir}/animeAfterTransform.json");
|
||||
|
@ -18,15 +18,15 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use Aviat\AnimeClient\API\JsonAPI;
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\Tests\AnimeClientTestCase;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
class MangaListTransformerTest extends AnimeClient_TestCase {
|
||||
class MangaListTransformerTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
$this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
|
||||
$rawBefore = Json::decodeFile("{$this->dir}/mangaListBeforeTransform.json");
|
||||
$this->beforeTransform = JsonAPI::inlineRawIncludes($rawBefore, 'manga');
|
||||
|
@ -18,15 +18,15 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer;
|
||||
|
||||
use Aviat\AnimeClient\API\JsonAPI;
|
||||
use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\Tests\AnimeClientTestCase;
|
||||
use Aviat\Ion\Json;
|
||||
|
||||
class MangaTransformerTest extends AnimeClient_TestCase {
|
||||
class MangaTransformerTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
$this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu';
|
||||
|
||||
$data = Json::decodeFile("{$this->dir}/mangaBeforeTransform.json");
|
||||
$baseData = $data['data'][0]['attributes'];
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
class AnimeClientTest extends AnimeClient_TestCase {
|
||||
class AnimeClientTest extends AnimeClientTestCase {
|
||||
/**
|
||||
* Basic sanity test for _dir function
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@ define('TEST_VIEW_DIR', __DIR__ . '/test_views');
|
||||
/**
|
||||
* Base class for TestCases
|
||||
*/
|
||||
class AnimeClient_TestCase extends TestCase {
|
||||
class AnimeClientTestCase extends TestCase {
|
||||
// Test directory constants
|
||||
const ROOT_DIR = ROOT_DIR;
|
||||
const SRC_DIR = SRC_DIR;
|
||||
@ -160,4 +160,4 @@ class AnimeClient_TestCase extends TestCase {
|
||||
return Json::decode($rawData);
|
||||
}
|
||||
}
|
||||
// End of AnimeClient_TestCase.php
|
||||
// End of AnimeClientTestCase.php
|
@ -17,11 +17,11 @@
|
||||
namespace Aviat\AnimeClient\Tests\Command;
|
||||
|
||||
use Aviat\AnimeClient\Command\BaseCommand;
|
||||
use Aviat\AnimeClient\Tests\AnimeClient_TestCase;
|
||||
use Aviat\AnimeClient\Tests\AnimeClientTestCase;
|
||||
use Aviat\Ion\Friend;
|
||||
use ConsoleKit\Console;
|
||||
|
||||
class BaseCommandTest extends AnimeClient_TestCase {
|
||||
class BaseCommandTest extends AnimeClientTestCase {
|
||||
public function setUp()
|
||||
{
|
||||
$this->base = new BaseCommand(new Console());
|
||||
|
@ -11,7 +11,7 @@ use Aviat\AnimeClient\Controller\{
|
||||
Manga as MangaController
|
||||
};
|
||||
|
||||
class ControllerTest extends AnimeClient_TestCase {
|
||||
class ControllerTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
|
||||
|
||||
class DispatcherTest extends AnimeClient_TestCase {
|
||||
class DispatcherTest extends AnimeClientTestCase {
|
||||
|
||||
protected $container;
|
||||
protected $router;
|
||||
|
@ -18,7 +18,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\Helper\Menu as MenuHelper;
|
||||
|
||||
class MenuHelperTest extends AnimeClient_TestCase {
|
||||
class MenuHelperTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
use Aviat\AnimeClient\MenuGenerator;
|
||||
use Aviat\Ion\Friend;
|
||||
|
||||
class MenuGeneratorTest extends AnimeClient_TestCase {
|
||||
class MenuGeneratorTest extends AnimeClientTestCase {
|
||||
|
||||
protected $generator;
|
||||
protected $friend;
|
||||
|
@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use PDO;
|
||||
|
||||
class RequirementsTest extends AnimeClient_TestCase {
|
||||
class RequirementsTest extends AnimeClientTestCase {
|
||||
|
||||
public function testPHPVersion()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\RoutingBase;
|
||||
|
||||
class RoutingBaseTest extends AnimeClient_TestCase {
|
||||
class RoutingBaseTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
use Aviat\AnimeClient\UrlGenerator;
|
||||
use Aviat\Ion\Config;
|
||||
|
||||
class UrlGeneratorTest extends AnimeClient_TestCase {
|
||||
class UrlGeneratorTest extends AnimeClientTestCase {
|
||||
|
||||
public function assetUrlProvider()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests;
|
||||
|
||||
use Aviat\AnimeClient\Util;
|
||||
|
||||
class UtilTest extends AnimeClient_TestCase {
|
||||
class UtilTest extends AnimeClientTestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ function _dir()
|
||||
// Autoloading
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
require _dir(__DIR__, 'AnimeClient_TestCase.php');
|
||||
require _dir(__DIR__, 'AnimeClientTestCase.php');
|
||||
require _dir(__DIR__, '../vendor/autoload.php');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -3,18 +3,15 @@
|
||||
* All the mock classes that extend the classes they are used to test
|
||||
*/
|
||||
|
||||
use Aviat\AnimeClient\Model\Anime as AnimeModel;
|
||||
use Aviat\AnimeClient\Model\API as BaseApiModel;
|
||||
use Aviat\AnimeClient\Model\Manga as MangaModel;
|
||||
use Aviat\Ion\Enum;
|
||||
use Aviat\Ion\Friend;
|
||||
use Aviat\Ion\Json;
|
||||
use Aviat\AnimeClient\Model\{
|
||||
Anime as AnimeModel,
|
||||
API as BaseApiModel,
|
||||
Manga as MangaModel
|
||||
};
|
||||
use Aviat\Ion\{Enum, Friend, Json};
|
||||
use Aviat\Ion\Transformer\AbstractTransformer;
|
||||
use Aviat\Ion\View;
|
||||
use Aviat\Ion\View\HtmlView;
|
||||
use Aviat\Ion\View\HttpView;
|
||||
use Aviat\Ion\View\JsonView;
|
||||
|
||||
use Aviat\Ion\View\{HtmlView, HttpView, JsonView};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Mock the default error handler
|
||||
|
Loading…
Reference in New Issue
Block a user