Skip to content

Commit

Permalink
pluralize $fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Sep 23, 2014
1 parent a6df593 commit 38b9abd
Show file tree
Hide file tree
Showing 41 changed files with 99 additions and 94 deletions.
2 changes: 1 addition & 1 deletion tests/TestCase/Auth/BasicAuthenticateTest.php
Expand Up @@ -34,7 +34,7 @@ class BasicAuthenticateTest extends TestCase {
*
* @var array
*/
public $fixtures = array('core.user', 'core.auth_user');
public $fixtures = array('core.users', 'core.auth_users');

/**
* setup
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Auth/DigestAuthenticateTest.php
Expand Up @@ -35,7 +35,7 @@ class DigestAuthenticateTest extends TestCase {
*
* @var array
*/
public $fixtures = array('core.user', 'core.auth_user');
public $fixtures = array('core.users', 'core.auth_users');

/**
* setup
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Auth/FormAuthenticateTest.php
Expand Up @@ -37,7 +37,7 @@ class FormAuthenticateTest extends TestCase {
*
* @var array
*/
public $fixtures = ['core.user', 'core.auth_user'];
public $fixtures = ['core.users', 'core.auth_users'];

/**
* setup
Expand Down
13 changes: 9 additions & 4 deletions tests/TestCase/Console/ShellTest.php
Expand Up @@ -121,10 +121,15 @@ class ShellTest extends TestCase {
*
* @var array
*/
public $fixtures = array(
'core.post', 'core.comment', 'core.article', 'core.user',
'core.tag', 'core.articles_tag', 'core.attachment'
);
public $fixtures = [
'core.posts',
'core.comments',
'core.articles',
'core.users',
'core.tags',
'core.articles_tags',
'core.attachments'
];

/**
* setUp method
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/Component/AuthComponentTest.php
Expand Up @@ -51,7 +51,7 @@ class AuthComponentTest extends TestCase {
*
* @var array
*/
public $fixtures = ['core.user', 'core.auth_user'];
public $fixtures = ['core.users', 'core.auth_users'];

/**
* setUp method
Expand Down
16 changes: 8 additions & 8 deletions tests/TestCase/Controller/Component/PaginatorComponentTest.php
Expand Up @@ -46,7 +46,7 @@ class PaginatorComponentTest extends TestCase {
*
* @var array
*/
public $fixtures = array('core.post');
public $fixtures = array('core.posts');

/**
* Don't load data for fixtures for all tests
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testPaginateExtraParams() {
* @return void
*/
public function testPaginateCustomFinderOptions() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$settings = [
'PaginatorPosts' => [
'finder' => ['author' => ['author_id' => 1]]
Expand Down Expand Up @@ -469,7 +469,7 @@ public function testValidateSortInvalidDirection() {
* @return void
*/
public function testOutOfRangePageNumberGetsClamped() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$this->request->query['page'] = 3000;

$table = TableRegistry::get('PaginatorPosts');
Expand All @@ -492,7 +492,7 @@ public function testOutOfRangePageNumberGetsClamped() {
* @return void
*/
public function testOutOfVeryBigPageNumberGetsClamped() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$this->request->query = [
'page' => '3000000000000000000000000',
];
Expand Down Expand Up @@ -660,7 +660,7 @@ public function testCheckLimit() {
* @return void
*/
public function testPaginateMaxLimit() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$table = TableRegistry::get('PaginatorPosts');

$settings = [
Expand All @@ -687,7 +687,7 @@ public function testPaginateMaxLimit() {
* @return void
*/
public function testPaginateCustomFind() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$idExtractor = function ($result) {
$ids = [];
foreach ($result as $record) {
Expand Down Expand Up @@ -740,7 +740,7 @@ public function testPaginateCustomFind() {
* @return void
*/
public function testPaginateCustomFindOldOption() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$table = TableRegistry::get('PaginatorPosts');
$this->Paginator->paginate($table, ['findType' => 'published']);
}
Expand All @@ -751,7 +751,7 @@ public function testPaginateCustomFindOldOption() {
* @return void
*/
public function testPaginateCustomFindFieldsArray() {
$this->loadFixtures('Post');
$this->loadFixtures('Posts');
$table = TableRegistry::get('PaginatorPosts');
$data = array('author_id' => 3, 'title' => 'Fourth Article', 'body' => 'Article Body, unpublished', 'published' => 'N');
$table->save(new \Cake\ORM\Entity($data));
Expand Down
Expand Up @@ -37,7 +37,7 @@ class SessionComponentTest extends TestCase {
*
* @var string
*/
public $fixtures = array('core.session');
public $fixtures = array('core.sessions');

/**
* test case startup
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Controller/ControllerTest.php
Expand Up @@ -206,8 +206,8 @@ class ControllerTest extends TestCase {
* @var array
*/
public $fixtures = array(
'core.post',
'core.comment'
'core.posts',
'core.comments'
);

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/ConnectionTest.php
Expand Up @@ -24,7 +24,7 @@
*/
class ConnectionTest extends TestCase {

public $fixtures = ['core.thing'];
public $fixtures = ['core.things'];

public function setUp() {
$this->connection = ConnectionManager::get('test');
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/QueryTest.php
Expand Up @@ -26,7 +26,7 @@
*/
class QueryTest extends TestCase {

public $fixtures = ['core.article', 'core.author', 'core.comment'];
public $fixtures = ['core.articles', 'core.authors', 'core.comments'];

const ARTICLE_COUNT = 3;
const AUTHOR_COUNT = 4;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Schema/CollectionTest.php
Expand Up @@ -28,7 +28,7 @@
class CollectionTest extends TestCase {

public $fixtures = [
'core.user'
'core.users'
];

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Model/Behavior/CounterCacheBehaviorTest.php
Expand Up @@ -45,8 +45,8 @@ class CounterCacheBehaviorTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.counter_cache_user',
'core.counter_cache_post'
'core.counter_cache_users',
'core.counter_cache_posts'
];

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Model/Behavior/TimestampBehaviorTest.php
Expand Up @@ -41,7 +41,7 @@ class TimestampBehaviorTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.user'
'core.users'
];

/**
Expand Down Expand Up @@ -355,7 +355,7 @@ public function testTouchCustomEvent() {
* @return void
*/
public function testSaveTriggersInsert() {
$this->loadFixtures('User');
$this->loadFixtures('Users');

$table = TableRegistry::get('users');
$table->addBehavior('Timestamp', [
Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/Model/Behavior/TranslateBehaviorTest.php
Expand Up @@ -33,10 +33,10 @@ class TranslateBehaviorTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.translate',
'core.article',
'core.comment',
'core.author'
'core.translates',
'core.articles',
'core.comments',
'core.authors'
];

public function tearDown() {
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Model/Behavior/TreeBehaviorTest.php
Expand Up @@ -32,8 +32,8 @@ class TreeBehaviorTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.number_tree',
'core.menu_link_tree'
'core.number_trees',
'core.menu_link_trees'
];

public function setUp() {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Network/Session/DatabaseSessionTest.php
Expand Up @@ -35,7 +35,7 @@ class DatabaseSessionTest extends TestCase {
*
* @var string
*/
public $fixtures = ['core.session'];
public $fixtures = ['core.sessions'];

/**
* setUp
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Network/SessionTest.php
Expand Up @@ -60,7 +60,7 @@ class SessionTest extends TestCase {
*
* @var array
*/
public $fixtures = array('core.session', 'core.cake_session');
public $fixtures = array('core.sessions', 'core.cake_sessions');

/**
* setup before class.
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/Association/BelongsToTest.php
Expand Up @@ -34,7 +34,7 @@ class BelongsToTest extends \Cake\TestSuite\TestCase {
*
* @var array
*/
public $fixtures = ['core.article', 'core.comment'];
public $fixtures = ['core.articles', 'core.comments'];

/**
* Don't autoload fixtures as most tests uses mocks.
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/AssociationProxyTest.php
Expand Up @@ -32,7 +32,7 @@ class AssociationProxyTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.article', 'core.author', 'core.comment'
'core.articles', 'core.authors', 'core.comments'
];

/**
Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/ORM/CompositeKeysTest.php
Expand Up @@ -44,10 +44,10 @@ class CompositeKeyTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.site_article',
'core.site_author',
'core.site_tag',
'core.site_articles_tag'
'core.site_articles',
'core.site_authors',
'core.site_tags',
'core.site_articles_tags'
];

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/MarshallerTest.php
Expand Up @@ -49,7 +49,7 @@ class ProtectedArticle extends Entity {
*/
class MarshallerTest extends TestCase {

public $fixtures = ['core.tag', 'core.articles_tag', 'core.article', 'core.user', 'core.comment'];
public $fixtures = ['core.tags', 'core.articles_tags', 'core.articles', 'core.users', 'core.comments'];

/**
* setup
Expand Down
16 changes: 8 additions & 8 deletions tests/TestCase/ORM/QueryRegressionTest.php
Expand Up @@ -33,14 +33,14 @@ class QueryRegressionTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.user',
'core.article',
'core.comment',
'core.tag',
'core.articles_tag',
'core.author',
'core.special_tag',
'core.translate',
'core.users',
'core.articles',
'core.comments',
'core.tags',
'core.articles_tags',
'core.authors',
'core.special_tags',
'core.translates',
];

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ORM/QueryTest.php
Expand Up @@ -35,8 +35,8 @@ class QueryTest extends TestCase {
*
* @var array
*/
public $fixtures = ['core.article', 'core.author', 'core.tag',
'core.articles_tag', 'core.post'];
public $fixtures = ['core.articles', 'core.authors', 'core.tags',
'core.articles_tags', 'core.posts'];

/**
* setUp method
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/ResultSetTest.php
Expand Up @@ -28,7 +28,7 @@
*/
class ResultSetTest extends TestCase {

public $fixtures = ['core.article', 'core.comment'];
public $fixtures = ['core.articles', 'core.comments'];

/**
* setup
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ORM/TableTest.php
Expand Up @@ -38,8 +38,8 @@ class UsersTable extends Table {
class TableTest extends \Cake\TestSuite\TestCase {

public $fixtures = [
'core.user', 'core.category', 'core.article', 'core.author',
'core.tag', 'core.articles_tag'
'core.users', 'core.categories', 'core.articles', 'core.authors',
'core.tags', 'core.articles_tags'
];

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/TableUuidTest.php
Expand Up @@ -34,7 +34,7 @@ class TableUuidTest extends TestCase {
* @var array
*/
public $fixtures = [
'core.uuiditem', 'core.uuidportfolio'
'core.uuiditems', 'core.uuidportfolios'
];

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/ValidationIntegrationTest.php
Expand Up @@ -28,7 +28,7 @@ class ValidationIntegrationTest extends TestCase {
*
* @var array
*/
public $fixtures = ['core.article'];
public $fixtures = ['core.articles'];

/**
* Tear down
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Routing/RequestActionTraitTest.php
Expand Up @@ -31,7 +31,7 @@ class RequestActionTraitTest extends TestCase {
*
* @var string
*/
public $fixtures = array('core.post', 'core.test_plugin_comment', 'core.comment');
public $fixtures = array('core.posts', 'core.test_plugin_comments', 'core.comments');

/**
* Setup
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/BakeShellTest.php
Expand Up @@ -28,7 +28,7 @@ class BakeShellTest extends TestCase {
*
* @var array
*/
public $fixtures = array('core.comment');
public $fixtures = array('core.comments');

/**
* setup test
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/OrmCacheShellTest.php
Expand Up @@ -29,7 +29,7 @@ class OrmCacheShellTest extends TestCase {
*
* @var array
*/
public $fixtures = ['core.article', 'core.tag'];
public $fixtures = ['core.articles', 'core.tags'];

/**
* setup method
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/Task/ControllerTaskTest.php
Expand Up @@ -48,7 +48,7 @@ class ControllerTaskTest extends TestCase {
*
* @var array
*/
public $fixtures = ['core.bake_article', 'core.bake_articles_bake_tag', 'core.bake_comment', 'core.bake_tag'];
public $fixtures = ['core.bake_articles', 'core.bake_articles_bake_tags', 'core.bake_comments', 'core.bake_tags'];

/**
* setUp method
Expand Down

0 comments on commit 38b9abd

Please sign in to comment.