Move tests to tests/ directory

This commit is contained in:
Timothy Warren 2016-08-29 17:09:56 -04:00
parent bf01e41e32
commit 4607d146a4
20 changed files with 92 additions and 89 deletions

View File

@ -13,7 +13,7 @@
</filter> </filter>
<testsuites> <testsuites>
<testsuite name="AnimeClient"> <testsuite name="AnimeClient">
<directory>../tests/AnimeClient</directory> <directory>../tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<logging> <logging>

View File

@ -12,7 +12,7 @@
</filter> </filter>
<testsuites> <testsuites>
<testsuite name="AnimeClient"> <testsuite name="AnimeClient">
<directory>tests/AnimeClient</directory> <directory>tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<php> <php>

View File

@ -9,7 +9,7 @@ class AnimeModelTest extends AnimeClient_TestCase {
{ {
parent::setUp(); parent::setUp();
$this->animeModel = new Friend(new TestAnimeModel($this->container)); $this->animeModel = new Friend(new TestAnimeModel($this->container));
$this->mockDir = __DIR__ . '/../../test_data/anime_list/search_mocks'; $this->mockDir = __DIR__ . '/../test_data/anime_list/search_mocks';
} }
public function dataSearch() public function dataSearch()
@ -50,7 +50,8 @@ class AnimeModelTest extends AnimeClient_TestCase {
], "[]"); ], "[]");
$this->animeModel->__set('client', $client); $this->animeModel->__set('client', $client);
$this->setExpectedException('\RuntimeException'); $this->expectException('RuntimeException');
$this->animeModel->search(''); $this->animeModel->search('');
} }
} }

View File

@ -14,7 +14,7 @@ class MangaModelTest extends AnimeClient_TestCase {
parent::setUp(); parent::setUp();
$this->container->setInstance('util', new MockUtil($this->container)); $this->container->setInstance('util', new MockUtil($this->container));
$this->model = new Friend(new TestMangaModel($this->container)); $this->model = new Friend(new TestMangaModel($this->container));
$this->mockDir = __DIR__ . '/../../test_data/manga_list'; $this->mockDir = __DIR__ . '/../test_data/manga_list';
} }
public function testZipperLists() public function testZipperLists()

View File

@ -9,8 +9,8 @@ class AnimeListTransformerTest extends AnimeClient_TestCase {
public function setUp() public function setUp()
{ {
parent::setUp(); parent::setUp();
$this->start_file = __DIR__ . '/../../../test_data/anime_list/anime-completed.json'; $this->start_file = __DIR__ . '/../test_data/anime_list/anime-completed.json';
$this->res_file = __DIR__ . '/../../../test_data/anime_list/anime-completed-transformed.json'; $this->res_file = __DIR__ . '/../test_data/anime_list/anime-completed-transformed.json';
$this->transformer = new AnimeListTransformer(); $this->transformer = new AnimeListTransformer();
$this->transformerFriend = new Friend($this->transformer); $this->transformerFriend = new Friend($this->transformer);
} }

View File

@ -8,8 +8,8 @@ class MangaListTransformerTest extends AnimeClient_TestCase {
public function setUp() public function setUp()
{ {
parent::setUp(); parent::setUp();
$this->start_file = __DIR__ . '/../../../test_data/manga_list/manga-zippered.json'; $this->start_file = __DIR__ . '/../test_data/manga_list/manga-zippered.json';
$this->res_file = __DIR__ . '/../../../test_data/manga_list/manga-transformed.json'; $this->res_file = __DIR__ . '/../test_data/manga_list/manga-transformed.json';
$this->transformer = new MangaListTransformer(); $this->transformer = new MangaListTransformer();
} }

View File

@ -10,8 +10,8 @@ class MangaListsZipperTest extends AnimeClient_TestCase {
public function setUp() public function setUp()
{ {
$this->start_file = __DIR__ . '/../../../test_data/manga_list/manga.json'; $this->start_file = __DIR__ . '/../test_data/manga_list/manga.json';
$this->res_file = __DIR__ . '/../../../test_data/manga_list/manga-zippered.json'; $this->res_file = __DIR__ . '/../test_data/manga_list/manga-zippered.json';
$json = Json::decodeFile($this->start_file); $json = Json::decodeFile($this->start_file);
$this->mangaListsZipper = new MangaListsZipper($json); $this->mangaListsZipper = new MangaListsZipper($json);

View File

@ -1,8 +1,10 @@
<?php <?php
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()
{ {