Created
November 16, 2013 07:13
-
-
Save simkimsia/7497027 to your computer and use it in GitHub Desktop.
Example to demonstrate the template in https://gist.github.com/simkimsia/7497019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* UserFixture | |
* | |
* Fixtures for a User model that belongsTo Group as the relationship Group | |
* | |
* Copyright 2013, Kim Stacks | |
* Singapore | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* | |
* @copyright Copyright 2013, Kim Stacks. | |
* @link http://stacktogether.com | |
* @author Kim Stacks <kim@stacktogether.com> | |
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | |
* @package SuperDuperMakeUnicorns | |
* @subpackage SuperDuperMakeUnicorns.Test.Fixture | |
* @version 0.1.0 | |
*/ | |
class UserFixture extends CakeTestFixture { | |
public $fields = array( | |
'id' => array('type' => 'integer', 'key' => 'primary'), | |
'username' => array('type' => 'string', 'length' => 255, 'null' => false), | |
'group_id' => array('type' => 'integer', 'length' => 11, 'null' => false) | |
); | |
public $records = array( | |
array('id' => 1, 'username' => 'CakePHP', 'group_id' => 1), | |
array('id' => 2, 'username' => 'Zend', 'group_id' => 2), | |
array('id' => 3, 'username' => 'Symfony', 'group_id' => 1), | |
array('id' => 4, 'username' => 'CodeIgniter', 'group_id' => 2) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment