Browse Source

Remove added fixtures and use existing. Updated one old test to add data from afterFind callback

k-halaburda 12 years ago
parent
commit
d7dab3282f

+ 45 - 21
lib/Cake/Test/Case/Model/ModelIntegrationTest.php

@@ -1708,7 +1708,8 @@ class ModelIntegrationTest extends BaseModelTest {
 					'body' => 'First Post Body',
 					'published' => 'Y',
 					'created' => '2007-03-18 10:39:23',
-					'updated' => '2007-03-18 10:41:31'
+					'updated' => '2007-03-18 10:41:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
 				'Something' => array(
 					array(
@@ -1724,7 +1725,8 @@ class ModelIntegrationTest extends BaseModelTest {
 							'something_else_id' => '1',
 							'doomed' => true,
 							'created' => '2007-03-18 10:43:23',
-							'updated' => '2007-03-18 10:45:31'
+							'updated' => '2007-03-18 10:45:31',
+							'afterFind' => 'Successfuly added by AfterFind'
 			)))),
 			array(
 				'SomethingElse' => array(
@@ -1733,7 +1735,8 @@ class ModelIntegrationTest extends BaseModelTest {
 					'body' => 'Second Post Body',
 					'published' => 'Y',
 					'created' => '2007-03-18 10:41:23',
-					'updated' => '2007-03-18 10:43:31'
+					'updated' => '2007-03-18 10:43:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
 				'Something' => array(
 					array(
@@ -1749,7 +1752,8 @@ class ModelIntegrationTest extends BaseModelTest {
 							'something_else_id' => '2',
 							'doomed' => true,
 							'created' => '2007-03-18 10:39:23',
-							'updated' => '2007-03-18 10:41:31'
+							'updated' => '2007-03-18 10:41:31',
+							'afterFind' => 'Successfuly added by AfterFind'
 			)))),
 			array(
 				'SomethingElse' => array(
@@ -1758,7 +1762,8 @@ class ModelIntegrationTest extends BaseModelTest {
 					'body' => 'Third Post Body',
 					'published' => 'Y',
 					'created' => '2007-03-18 10:43:23',
-					'updated' => '2007-03-18 10:45:31'
+					'updated' => '2007-03-18 10:45:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
 				'Something' => array(
 					array(
@@ -1774,7 +1779,8 @@ class ModelIntegrationTest extends BaseModelTest {
 							'something_else_id' => '3',
 							'doomed' => false,
 							'created' => '2007-03-18 10:41:23',
-							'updated' => '2007-03-18 10:43:31'
+							'updated' => '2007-03-18 10:43:31',
+							'afterFind' => 'Successfuly added by AfterFind'
 		)))));
 		$this->assertEquals($expected, $result);
 
@@ -1800,8 +1806,11 @@ class ModelIntegrationTest extends BaseModelTest {
 						'JoinThing' => array(
 							'doomed' => true,
 							'something_id' => '1',
-							'something_else_id' => '2'
-			)))),
+							'something_else_id' => '2',
+							'afterFind' => 'Successfuly added by AfterFind'
+						),
+						'afterFind' => 'Successfuly added by AfterFind'
+					))),
 			array(
 				'Something' => array(
 					'id' => '2',
@@ -1822,8 +1831,11 @@ class ModelIntegrationTest extends BaseModelTest {
 						'JoinThing' => array(
 							'doomed' => false,
 							'something_id' => '2',
-							'something_else_id' => '3'
-			)))),
+							'something_else_id' => '3',
+							'afterFind' => 'Successfuly added by AfterFind'
+						),
+						'afterFind' => 'Successfuly added by AfterFind'
+					))),
 			array(
 				'Something' => array(
 					'id' => '3',
@@ -1844,8 +1856,11 @@ class ModelIntegrationTest extends BaseModelTest {
 						'JoinThing' => array(
 							'doomed' => true,
 							'something_id' => '3',
-							'something_else_id' => '1'
-		)))));
+							'something_else_id' => '1',
+							'afterFind' => 'Successfuly added by AfterFind'
+						),
+						'afterFind' => 'Successfuly added by AfterFind'
+		))));
 		$this->assertEquals($expected, $result);
 
 		$result = $TestModel->findById(1);
@@ -1869,8 +1884,11 @@ class ModelIntegrationTest extends BaseModelTest {
 					'JoinThing' => array(
 						'doomed' => true,
 						'something_id' => '1',
-						'something_else_id' => '2'
-		))));
+						'something_else_id' => '2',
+						'afterFind' => 'Successfuly added by AfterFind'
+					),
+					'afterFind' => 'Successfuly added by AfterFind'
+		)));
 		$this->assertEquals($expected, $result);
 
 		$expected = $TestModel->findById(1);
@@ -1910,8 +1928,10 @@ class ModelIntegrationTest extends BaseModelTest {
 					'JoinThing' => array(
 						'doomed' => true,
 						'something_id' => '1',
-						'something_else_id' => '1'
-				)
+						'something_else_id' => '1',
+						'afterFind' => 'Successfuly added by AfterFind'
+					),
+					'afterFind' => 'Successfuly added by AfterFind'
 			),
 				array(
 					'id' => '2',
@@ -1923,8 +1943,10 @@ class ModelIntegrationTest extends BaseModelTest {
 					'JoinThing' => array(
 						'doomed' => true,
 						'something_id' => '1',
-						'something_else_id' => '2'
-				)
+						'something_else_id' => '2',
+						'afterFind' => 'Successfuly added by AfterFind'
+					),
+					'afterFind' => 'Successfuly added by AfterFind'
 			),
 				array(
 					'id' => '3',
@@ -1936,10 +1958,12 @@ class ModelIntegrationTest extends BaseModelTest {
 					'JoinThing' => array(
 						'doomed' => false,
 						'something_id' => '1',
-						'something_else_id' => '3')
-					)
+						'something_else_id' => '3',
+						'afterFind' => 'Successfuly added by AfterFind'
+					),
+					'afterFind' => 'Successfuly added by AfterFind'
 				)
-			);
+			));
 		$this->assertEquals(self::date(), $result['Something']['updated']);
 		unset($result['Something']['updated']);
 		$this->assertEquals($expected, $result);

+ 194 - 152
lib/Cake/Test/Case/Model/ModelReadTest.php

@@ -7974,201 +7974,243 @@ class ModelReadTest extends BaseModelTest {
  * @return void 
  */
 	public function testRelatedAfterFindCallback() {
-		$this->loadFixtures('ModelWithRelations', 'ModelRelated', 'ModelHabtmRelation');
-		$ModelWithRelations = new ModelWithRelations();
-
-		$ModelWithRelations->bindModel(array(
-			'belongsTo' => array(
-				'BelongsTo' => array(
-					'className' => 'ModelRelated',
-					'foreignKey' => 'related_id',
-				)
-			)
-				)
-		);
-		$results = $ModelWithRelations->find('all');
-		$expected = array(
-			array(
-				'ModelWithRelations' => array(
-					'id' => '1',
-					'name' => 'First record',
-					'related_id' => '1'
-				),
-				'BelongsTo' => array(
-					'id' => '1',
-					'name' => 'Successfuly changed in AfterFind',
-					'primary_id' => '1'
+		$this->loadFixtures('Something', 'SomethingElse', 'JoinThing');
+		$Something = new Something();
+		
+		$Something->bindModel(array(
+			'hasMany' => array(
+				'HasMany' => array(
+					'className' => 'JoinThing',
+					'foreignKey' => 'something_id'
 				)
 			),
-			array(
-				'ModelWithRelations' => array(
-					'id' => '2',
-					'name' => 'Second record',
-					'related_id' => '2'
-				),
-				'BelongsTo' => array(
-					'id' => '2',
-					'name' => 'Successfuly changed in AfterFind',
-					'primary_id' => '2'
-				)
-			)
-		);
-		$this->assertEquals($expected, $results, 'Model related with belongsTo afterFind callback fail');
-
-		$ModelWithRelations->bindModel(array(
-			'hasOne' => array(
-				'HasOne' => array(
-					'className' => 'ModelRelated',
-					'foreignKey' => 'primary_id',
+			'hasOne'=>array(
+				'HasOne'=>array(
+					'className' => 'JoinThing',
+					'foreignKey' => 'something_id'
 				)
 			)
-				)
-		);
-		$results = $ModelWithRelations->find('all');
+		)
+			);
+		
+		$results = $Something->find('all');
+		
 		$expected = array(
 			array(
-				'ModelWithRelations' => array(
+				'Something' => array(
 					'id' => '1',
-					'name' => 'First record',
-					'related_id' => '1'
+					'title' => 'First Post',
+					'body' => 'First Post Body',
+					'published' => 'Y',
+					'created' => '2007-03-18 10:39:23',
+					'updated' => '2007-03-18 10:41:31'
 				),
 				'HasOne' => array(
 					'id' => '1',
-					'name' => 'Successfuly changed in AfterFind',
-					'primary_id' => '1'
+					'something_id' => '1',
+					'something_else_id' => '2',
+					'doomed' => true,
+					'created' => '2007-03-18 10:39:23',
+					'updated' => '2007-03-18 10:41:31',
+					'afterFind' => 'Successfuly added by AfterFind'
+				),
+				'HasMany' => array(
+					array(
+						'id' => '1',
+						'something_id' => '1',
+						'something_else_id' => '2',
+						'doomed' => true,
+						'created' => '2007-03-18 10:39:23',
+						'updated' => '2007-03-18 10:41:31',
+						'afterFind' => 'Successfuly added by AfterFind'
+					)
+				),
+				'SomethingElse' => array(
+					array(
+						'id' => '2',
+						'title' => 'Second Post',
+						'body' => 'Second Post Body',
+						'published' => 'Y',
+						'created' => '2007-03-18 10:41:23',
+						'updated' => '2007-03-18 10:43:31',
+						'afterFind' => 'Successfuly added by AfterFind',
+						'JoinThing' => array(
+							'doomed' => true,
+							'something_id' => '1',
+							'something_else_id' => '2',
+							'afterFind' => 'Successfuly added by AfterFind'
+						)
+					)
 				)
 			),
 			array(
-				'ModelWithRelations' => array(
+				'Something' => array(
 					'id' => '2',
-					'name' => 'Second record',
-					'related_id' => '2'
+					'title' => 'Second Post',
+					'body' => 'Second Post Body',
+					'published' => 'Y',
+					'created' => '2007-03-18 10:41:23',
+					'updated' => '2007-03-18 10:43:31'
 				),
 				'HasOne' => array(
 					'id' => '2',
-					'name' => 'Successfuly changed in AfterFind',
-					'primary_id' => '2'
-				)
-			)
-		);
-		$this->assertEquals($expected, $results, 'Model related with hasOne afterFind callback fail');
-
-		$ModelWithRelations->bindModel(array(
-			'hasMany' => array(
-				'HasMany' => array(
-					'className' => 'ModelRelated',
-					'foreignKey' => 'primary_id',
-				)
-			)
-				)
-		);
-		$results = $ModelWithRelations->find('all');
-
-		$expected = array(
-			array(
-				'ModelWithRelations' => array(
-					'id' => '1',
-					'name' => 'First record',
-					'related_id' => '1'
+					'something_id' => '2',
+					'something_else_id' => '3',
+					'doomed' => false,
+					'created' => '2007-03-18 10:41:23',
+					'updated' => '2007-03-18 10:43:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
 				'HasMany' => array(
 					array(
-						'id' => '1',
-						'name' => 'Successfuly changed in AfterFind',
-						'primary_id' => '1'
+						'id' => '2',
+						'something_id' => '2',
+						'something_else_id' => '3',
+						'doomed' => false,
+						'created' => '2007-03-18 10:41:23',
+						'updated' => '2007-03-18 10:43:31',
+						'afterFind' => 'Successfuly added by AfterFind'
+					)
+				),
+				'SomethingElse' => array(
+					array(
+						'id' => '3',
+						'title' => 'Third Post',
+						'body' => 'Third Post Body',
+						'published' => 'Y',
+						'created' => '2007-03-18 10:43:23',
+						'updated' => '2007-03-18 10:45:31',
+						'afterFind' => 'Successfuly added by AfterFind',
+						'JoinThing' => array(
+							'doomed' => false,
+							'something_id' => '2',
+							'something_else_id' => '3',
+							'afterFind' => 'Successfuly added by AfterFind'
+						)
 					)
 				)
 			),
 			array(
-				'ModelWithRelations' => array(
-					'id' => '2',
-					'name' => 'Second record',
-					'related_id' => '2'
+				'Something' => array(
+					'id' => '3',
+					'title' => 'Third Post',
+					'body' => 'Third Post Body',
+					'published' => 'Y',
+					'created' => '2007-03-18 10:43:23',
+					'updated' => '2007-03-18 10:45:31'
+				),
+				'HasOne' => array(
+					'id' => '3',
+					'something_id' => '3',
+					'something_else_id' => '1',
+					'doomed' => true,
+					'created' => '2007-03-18 10:43:23',
+					'updated' => '2007-03-18 10:45:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
 				'HasMany' => array(
 					array(
-						'id' => '2',
-						'name' => 'Successfuly changed in AfterFind',
-						'primary_id' => '2'
+						'id' => '3',
+						'something_id' => '3',
+						'something_else_id' => '1',
+						'doomed' => true,
+						'created' => '2007-03-18 10:43:23',
+						'updated' => '2007-03-18 10:45:31',
+						'afterFind' => 'Successfuly added by AfterFind'
+					)
+				),
+				'SomethingElse' => array(
+					array(
+						'id' => '1',
+						'title' => 'First Post',
+						'body' => 'First Post Body',
+						'published' => 'Y',
+						'created' => '2007-03-18 10:39:23',
+						'updated' => '2007-03-18 10:41:31',
+						'afterFind' => 'Successfuly added by AfterFind',
+						'JoinThing' => array(
+							'doomed' => true,
+							'something_id' => '3',
+							'something_else_id' => '1',
+							'afterFind' => 'Successfuly added by AfterFind'
+						)
 					)
 				)
 			)
 		);
-		$this->assertEquals($expected, $results, 'Model related with hasMany afterFind callback fail');
-
-		$ModelWithRelations->bindModel(array(
-			'hasAndBelongsToMany' => array(
-				'HasAndBelongsToMany' => array(
-					'className' => 'ModelRelated',
-					'with' => 'ModelHabtmRelation',
-					'foreignKey' => 'primary_id',
-					'associationForeignKey' => 'related_id',
-				)
-			)
-				)
-		);
-		$results = $ModelWithRelations->find('all');
+		$this->assertEquals($expected, $results, 'Model related with has* afterFind callback fail');
 
+		$JoinThing = new JoinThing();
+		$JoinThing->unbindModel(array(
+			'belongsTo'=>array(
+				'Something'
+			)
+		)
+			);
+		$results = $JoinThing->find('all');
+		
 		$expected = array(
 			array(
-				'ModelWithRelations' => array(
+				'JoinThing' => array(
 					'id' => '1',
-					'name' => 'First record',
-					'related_id' => '1'
+					'something_id' => '1',
+					'something_else_id' => '2',
+					'doomed' => true,
+					'created' => '2007-03-18 10:39:23',
+					'updated' => '2007-03-18 10:41:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
-				'HasAndBelongsToMany' => array(
-					array(
-						'id' => '1',
-						'name' => 'Successfuly changed in AfterFind',
-						'primary_id' => '1',
-						'ModelHabtmRelation' => array(
-							'id' => '1',
-							'primary_id' => '1',
-							'related_id' => '1'
-						)
-					),
-					array(
-						'id' => '2',
-						'name' => 'Successfuly changed in AfterFind',
-						'primary_id' => '2',
-						'ModelHabtmRelation' => array(
-							'id' => '2',
-							'primary_id' => '1',
-							'related_id' => '2'
-						)
-					)
+				'SomethingElse' => array(
+					'id' => '2',
+					'title' => 'Second Post',
+					'body' => 'Second Post Body',
+					'published' => 'Y',
+					'created' => '2007-03-18 10:41:23',
+					'updated' => '2007-03-18 10:43:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				)
 			),
 			array(
-				'ModelWithRelations' => array(
+				'JoinThing' => array(
 					'id' => '2',
-					'name' => 'Second record',
-					'related_id' => '2'
+					'something_id' => '2',
+					'something_else_id' => '3',
+					'doomed' => false,
+					'created' => '2007-03-18 10:41:23',
+					'updated' => '2007-03-18 10:43:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				),
-				'HasAndBelongsToMany' => array(
-					array(
-						'id' => '1',
-						'name' => 'Successfuly changed in AfterFind',
-						'primary_id' => '1',
-						'ModelHabtmRelation' => array(
-							'id' => '3',
-							'primary_id' => '2',
-							'related_id' => '1'
-						)
-					),
-					array(
-						'id' => '2',
-						'name' => 'Successfuly changed in AfterFind',
-						'primary_id' => '2',
-						'ModelHabtmRelation' => array(
-							'id' => '4',
-							'primary_id' => '2',
-							'related_id' => '2'
-						)
-					)
+				'SomethingElse' => array(
+					'id' => '3',
+					'title' => 'Third Post',
+					'body' => 'Third Post Body',
+					'published' => 'Y',
+					'created' => '2007-03-18 10:43:23',
+					'updated' => '2007-03-18 10:45:31',
+					'afterFind' => 'Successfuly added by AfterFind'
+				)
+			),
+			array(
+				'JoinThing' => array(
+					'id' => '3',
+					'something_id' => '3',
+					'something_else_id' => '1',
+					'doomed' => true,
+					'created' => '2007-03-18 10:43:23',
+					'updated' => '2007-03-18 10:45:31',
+					'afterFind' => 'Successfuly added by AfterFind'
+				),
+				'SomethingElse' => array(
+					'id' => '1',
+					'title' => 'First Post',
+					'body' => 'First Post Body',
+					'published' => 'Y',
+					'created' => '2007-03-18 10:39:23',
+					'updated' => '2007-03-18 10:41:31',
+					'afterFind' => 'Successfuly added by AfterFind'
 				)
 			)
 		);
-		$this->assertEquals($expected, $results, 'Model related with hasAndBelongsToMany afterFind callback fail');
+		$this->assertEquals($expected, $results, 'Model related with belongsTo afterFind callback fail');
 	}
 }

+ 0 - 1
lib/Cake/Test/Case/Model/ModelTestBase.php

@@ -72,7 +72,6 @@ abstract class BaseModelTest extends CakeTestCase {
 		'core.fruits_uuid_tag', 'core.uuid_tag', 'core.product_update_all', 'core.group_update_all',
 		'core.player', 'core.guild', 'core.guilds_player', 'core.armor', 'core.armors_player',
 		'core.bidding', 'core.bidding_message', 'core.site', 'core.domain', 'core.domains_site',
-		'core.model_with_relations', 'core.model_related', 'core.model_habtm_relation',
 	);
 
 /**

+ 33 - 32
lib/Cake/Test/Case/Model/models.php

@@ -1501,6 +1501,22 @@ class SomethingElse extends CakeTestModel {
  * @var array
  */
 	public $hasAndBelongsToMany = array('Something' => array('with' => 'JoinThing'));
+
+/**
+ * afterFind callBack
+ * 
+ * @param array $results 
+ * @param bool $primary
+ * @return array
+ */
+	public function afterFind($results, $primary = false) {
+		foreach ($results as $key => $result) {
+			if(!empty($result[$this->alias]) && is_array($result[$this->alias])){
+				$results[$key][$this->alias]['afterFind'] = 'Successfuly added by AfterFind';
+			}
+		}
+		return $results;
+	}
 }
 
 /**
@@ -1523,6 +1539,22 @@ class JoinThing extends CakeTestModel {
  * @var array
  */
 	public $belongsTo = array('Something', 'SomethingElse');
+
+/**
+ * afterFind callBack
+ * 
+ * @param array $results 
+ * @param bool $primary
+ * @return array
+ */
+	public function afterFind($results, $primary = false) {
+		foreach ($results as $key => $result) {
+			if(!empty($result[$this->alias]) && is_array($result[$this->alias])){
+				$results[$key][$this->alias]['afterFind'] = 'Successfuly added by AfterFind';
+			}
+		}
+		return $results;
+	}
 }
 
 /**
@@ -4992,35 +5024,4 @@ class CustomArticle extends AppModel {
 		}
 	}
 
-}
-
-/**
- * ModelWithRelations class
- *
- * @package       Cake.Test.Case.Model
- */
-class ModelWithRelations extends CakeTestModel {
-
-}
-
-/**
- * ModelRelated class
- *
- * @package       Cake.Test.Case.Model
- */
-class ModelRelated extends CakeTestModel {
-
-/**
- * afterFind callback method
- *
- * @param array $results
- * @param boolean $primary
- * @return array Modified $results
- */
-	public function afterFind($results, $primary = false) {
-		foreach ($results as $key => $result) {
-			$results[$key][$this->alias]['name'] = 'Successfuly changed in AfterFind';
-		}
-		return $results;
-	}
-}
+}

+ 0 - 52
lib/Cake/Test/Fixture/ModelHabtmRelationFixture.php

@@ -1,52 +0,0 @@
-<?php
-
-/**
- * Short description for file.
- *
- * PHP 5
- *
- * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
- * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * For full copyright and license information, please see the LICENSE.txt
- * Redistributions of files must retain the above copyright notice
- *
- * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
- * @package       Cake.Test.Fixture
- * @since         CakePHP(tm) v 1.2.0.4667
- * @license       http://www.opensource.org/licenses/mit-license.php MIT License
- */
-
-/**
- * Class PrimaryRelatedFixture
- *
- * @package       Cake.Test.Fixture
- */
-class ModelHabtmRelationFixture extends CakeTestFixture {
-
-/**
- * fields property
- *
- * @var array
- */
-	public $fields = array(
-		'id' => array('type' => 'integer', 'key' => 'primary'),
-		'primary_id' => array('type' => 'integer'),
-		'related_id' => array('type' => 'integer'),
-	);
-
-/**
- * records property
- *
- * @var array
- */
-	public $records = array(
-		array('id' => 1, 'primary_id' => 1, 'related_id' => 1),
-		array('id' => 2, 'primary_id' => 1, 'related_id' => 2),
-		array('id' => 3, 'primary_id' => 2, 'related_id' => 1),
-		array('id' => 4, 'primary_id' => 2, 'related_id' => 2),
-	);
-
-}

+ 0 - 50
lib/Cake/Test/Fixture/ModelRelatedFixture.php

@@ -1,50 +0,0 @@
-<?php
-
-/**
- * Short description for file.
- *
- * PHP 5
- *
- * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
- * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * For full copyright and license information, please see the LICENSE.txt
- * Redistributions of files must retain the above copyright notice
- *
- * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
- * @package       Cake.Test.Fixture
- * @since         CakePHP(tm) v 1.2.0.4667
- * @license       http://www.opensource.org/licenses/mit-license.php MIT License
- */
-
-/**
- * Class RelatedFixture
- *
- * @package       Cake.Test.Fixture
- */
-class ModelRelatedFixture extends CakeTestFixture {
-
-/**
- * fields property
- *
- * @var array
- */
-	public $fields = array(
-		'id' => array('type' => 'integer', 'key' => 'primary'),
-		'name' => array('type' => 'string'),
-		'primary_id' => array('type' => 'integer'),
-	);
-
-/**
- * records property
- *
- * @var array
- */
-	public $records = array(
-		array('id' => 1, 'name' => 'This should change on afterFind', 'primary_id' => 1),
-		array('id' => 2, 'name' => 'This also should change on afterFind', 'primary_id' => 2)
-	);
-
-}

+ 0 - 50
lib/Cake/Test/Fixture/ModelWithRelationsFixture.php

@@ -1,50 +0,0 @@
-<?php
-
-/**
- * Short description for file.
- *
- * PHP 5
- *
- * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
- * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * For full copyright and license information, please see the LICENSE.txt
- * Redistributions of files must retain the above copyright notice
- *
- * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
- * @package       Cake.Test.Fixture
- * @since         CakePHP(tm) v 1.2.0.4667
- * @license       http://www.opensource.org/licenses/mit-license.php MIT License
- */
-
-/**
- * Class PrimaryFixture
- *
- * @package       Cake.Test.Fixture
- */
-class ModelWithRelationsFixture extends CakeTestFixture {
-
-/**
- * fields property
- *
- * @var array
- */
-	public $fields = array(
-		'id' => array('type' => 'integer', 'key' => 'primary'),
-		'name' => array('type' => 'string'),
-		'related_id' => array('type' => 'integer'),
-	);
-
-/**
- * records property
- *
- * @var array
- */
-	public $records = array(
-		array('id' => 1, 'name' => 'First record', 'related_id' => 1),
-		array('id' => 2, 'name' => 'Second record', 'related_id' => 2)
-	);
-
-}