Skip to content

Commit

Permalink
Fixed ids in fixtures cuase pain in all drivers but mysql, so removing
Browse files Browse the repository at this point in the history
them
  • Loading branch information
lorenzo committed Apr 12, 2014
1 parent 4aa23fc commit b89392f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 26 deletions.
6 changes: 3 additions & 3 deletions tests/Fixture/CounterCachePostFixture.php
Expand Up @@ -31,8 +31,8 @@ class CounterCachePostFixture extends TestFixture {
);

public $records = array(
array('title' => 'Rock and Roll', 'user_id' => 66, 'published' => 0),
array('title' => 'Music', 'user_id' => 66, 'published' => 1),
array('title' => 'Food', 'user_id' => 301, 'published' => 1),
array('title' => 'Rock and Roll', 'user_id' => 1, 'published' => 0),
array('title' => 'Music', 'user_id' => 1, 'published' => 1),
array('title' => 'Food', 'user_id' => 2, 'published' => 1),
);
}
4 changes: 2 additions & 2 deletions tests/Fixture/CounterCacheUserFixture.php
Expand Up @@ -31,7 +31,7 @@ class CounterCacheUserFixture extends TestFixture {
);

public $records = array(
array('id' => 66, 'name' => 'Alexander', 'post_count' => 2, 'posts_published' => 1),
array('id' => 301, 'name' => 'Steven', 'post_count' => 1, 'posts_published' => 1),
array('name' => 'Alexander', 'post_count' => 2, 'posts_published' => 1),
array('name' => 'Steven', 'post_count' => 1, 'posts_published' => 1),
);
}
18 changes: 0 additions & 18 deletions tests/Fixture/MenuLinkTreeFixture.php
Expand Up @@ -73,7 +73,6 @@ class MenuLinkTreeFixture extends TestFixture {
*/
public $records = array(
array(
'id' => '1',
'menu' => 'main-menu',
'lft' => '1',
'rght' => '10',
Expand All @@ -82,7 +81,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 1',
),
array(
'id' => '2',
'menu' => 'main-menu',
'lft' => '2',
'rght' => '3',
Expand All @@ -91,7 +89,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 2',
),
array(
'id' => '3',
'menu' => 'main-menu',
'lft' => '4',
'rght' => '9',
Expand All @@ -100,7 +97,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 3',
),
array(
'id' => '4',
'menu' => 'main-menu',
'lft' => '5',
'rght' => '8',
Expand All @@ -109,7 +105,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 4',
),
array(
'id' => '5',
'menu' => 'main-menu',
'lft' => '6',
'rght' => '7',
Expand All @@ -118,7 +113,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 5',
),
array(
'id' => '6',
'menu' => 'main-menu',
'lft' => '11',
'rght' => '14',
Expand All @@ -127,7 +121,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 6',
),
array(
'id' => '7',
'menu' => 'main-menu',
'lft' => '12',
'rght' => '13',
Expand All @@ -136,7 +129,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 7',
),
array(
'id' => '8',
'menu' => 'main-menu',
'lft' => '15',
'rght' => '16',
Expand All @@ -145,7 +137,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'Link 8',
),
array(
'id' => '9',
'menu' => 'categories',
'lft' => '1',
'rght' => '10',
Expand All @@ -154,7 +145,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'electronics',
),
array(
'id' => '10',
'menu' => 'categories',
'lft' => '2',
'rght' => '9',
Expand All @@ -163,7 +153,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'televisions',
),
array(
'id' => '11',
'menu' => 'categories',
'lft' => '3',
'rght' => '4',
Expand All @@ -172,7 +161,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'tube',
),
array(
'id' => '12',
'menu' => 'categories',
'lft' => '5',
'rght' => '8',
Expand All @@ -181,7 +169,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'lcd',
),
array(
'id' => '13',
'menu' => 'categories',
'lft' => '6',
'rght' => '7',
Expand All @@ -190,7 +177,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'plasma',
),
array(
'id' => '14',
'menu' => 'categories',
'lft' => '11',
'rght' => '20',
Expand All @@ -199,7 +185,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'portable',
),
array(
'id' => '15',
'menu' => 'categories',
'lft' => '12',
'rght' => '15',
Expand All @@ -208,7 +193,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'mp3',
),
array(
'id' => '16',
'menu' => 'categories',
'lft' => '13',
'rght' => '14',
Expand All @@ -217,7 +201,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'flash',
),
array(
'id' => '17',
'menu' => 'categories',
'lft' => '16',
'rght' => '17',
Expand All @@ -226,7 +209,6 @@ class MenuLinkTreeFixture extends TestFixture {
'title' => 'cd',
),
array(
'id' => '18',
'menu' => 'categories',
'lft' => '18',
'rght' => '19',
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Model/Behavior/CounterCacheBehaviorTest.php
Expand Up @@ -273,16 +273,16 @@ public function testMultiple() {
protected function _getEntity() {
return new Entity([
'title' => 'Test 123',
'user_id' => 66
'user_id' => 1
]);
}

/**
* Returns entity for user 66
* Returns entity for user 1
*
* @return Entity
*/
protected function _getUser() {
return $this->user->find('all')->where(['id' => 66])->first();
return $this->user->find('all')->where(['id' => 1])->first();
}
}

0 comments on commit b89392f

Please sign in to comment.