Skip to content

Commit

Permalink
adding models/behaviors for object persist tests
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8119 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
gwoo committed Mar 19, 2009
1 parent 641a483 commit 3d4c5b4
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 0 deletions.
38 changes: 38 additions & 0 deletions cake/tests/test_app/models/behaviors/persister_one_behavior.php
@@ -0,0 +1,38 @@
<?php
/* SVN FILE: $Id$ */
/**
* Behavior for binding management.
*
* Behavior to simplify manipulating a model's bindings when doing a find operation
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.tests.test_app.models
* @since CakePHP(tm) v 1.2.0.5669
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting
* the amount of associations and data returned.
*
* @package cake
* @subpackage cake.cake.console.libs
*/
class PersisterOneBehaviorBehavior extends ModelBehavior {


}
?>
38 changes: 38 additions & 0 deletions cake/tests/test_app/models/behaviors/persister_two_behavior.php
@@ -0,0 +1,38 @@
<?php
/* SVN FILE: $Id$ */
/**
* Behavior for binding management.
*
* Behavior to simplify manipulating a model's bindings when doing a find operation
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.tests.test_app.models
* @since CakePHP(tm) v 1.2.0.5669
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting
* the amount of associations and data returned.
*
* @package cake
* @subpackage cake.cake.console.libs
*/
class PersisterTwoBehaviorBehavior extends ModelBehavior {


}
?>
35 changes: 35 additions & 0 deletions cake/tests/test_app/models/persister_one.php
@@ -0,0 +1,35 @@
<?php
/* SVN FILE: $Id$ */
/**
* Test App Comment Model
*
*
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2006-2008, Cake Software Foundation, Inc.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.tests.test_app.models
* @since CakePHP v 1.2.0.7726
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
class PersisterOne extends AppModel {
var $useTable = 'posts';
var $name = 'PersisterOne';

var $actsAs = array('PersisterOneBehavior');

var $hasMany = array('Comment');
}
?>
35 changes: 35 additions & 0 deletions cake/tests/test_app/models/persister_two.php
@@ -0,0 +1,35 @@
<?php
/* SVN FILE: $Id$ */
/**
* Test App Comment Model
*
*
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2006-2008, Cake Software Foundation, Inc.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.tests.test_app.models
* @since CakePHP v 1.2.0.7726
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
class PersisterTwo extends AppModel {
var $useTable = 'posts';
var $name = 'PersisterTwo';

var $actsAs = array('PersisterOneBehavior');

var $hasMany = array('Comment');
}
?>

0 comments on commit 3d4c5b4

Please sign in to comment.