mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 13:02:40 +00:00
closes #5142 primary key on custom join models
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7393 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f97a3f27b0
commit
f6d269a9e0
6 changed files with 357 additions and 35 deletions
68
cake/tests/fixtures/account_fixture.php
vendored
Normal file
68
cake/tests/fixtures/account_fixture.php
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
* Long description for file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The Open Group Test Suite License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
||||
* @package cake.tests
|
||||
* @subpackage cake.tests.fixtures
|
||||
* @since CakePHP(tm) v 1.2.0.4667
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
/**
|
||||
* Short description for class.
|
||||
*
|
||||
* @package cake.tests
|
||||
* @subpackage cake.tests.fixtures
|
||||
*/
|
||||
class AccountFixture extends CakeTestFixture {
|
||||
/**
|
||||
* name property
|
||||
*
|
||||
* @var string 'Aco'
|
||||
* @access public
|
||||
*/
|
||||
var $name = 'Account';
|
||||
var $table = 'Accounts';
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $fields = array(
|
||||
'iAccountId' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'cDescription' => array('type' => 'string', 'length' => 10, 'null' => true)
|
||||
);
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $records = array(
|
||||
array('cDescription' => 'gwoo'),
|
||||
array('cDescription' => 'phpnut'),
|
||||
array('cDescription' => 'schreck'),
|
||||
array('cDescription' => 'dude')
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
71
cake/tests/fixtures/content_account_fixture.php
vendored
Normal file
71
cake/tests/fixtures/content_account_fixture.php
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
* Long description for file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The Open Group Test Suite License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
||||
* @package cake.tests
|
||||
* @subpackage cake.tests.fixtures
|
||||
* @since CakePHP(tm) v 1.2.0.4667
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
/**
|
||||
* Short description for class.
|
||||
*
|
||||
* @package cake.tests
|
||||
* @subpackage cake.tests.fixtures
|
||||
*/
|
||||
class ContentAccountFixture extends CakeTestFixture {
|
||||
/**
|
||||
* name property
|
||||
*
|
||||
* @var string 'Aco'
|
||||
* @access public
|
||||
*/
|
||||
var $name = 'ContentAccount';
|
||||
var $table = 'ContentAccounts';
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $fields = array(
|
||||
'iContentAccountsId' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'iContentId' => array('type' => 'integer'),
|
||||
'iAccountId' => array('type' => 'integer')
|
||||
);
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $records = array(
|
||||
array('iContentId' => 1, 'iAccountId' => 1),
|
||||
array('iContentId' => 2, 'iAccountId' => 2),
|
||||
array('iContentId' => 3, 'iAccountId' => 3),
|
||||
array('iContentId' => 4, 'iAccountId' => 4),
|
||||
array('iContentId' => 1, 'iAccountId' => 2),
|
||||
array('iContentId' => 2, 'iAccountId' => 3),
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
68
cake/tests/fixtures/content_fixture.php
vendored
Normal file
68
cake/tests/fixtures/content_fixture.php
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
* Long description for file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The Open Group Test Suite License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
||||
* @package cake.tests
|
||||
* @subpackage cake.tests.fixtures
|
||||
* @since CakePHP(tm) v 1.2.0.4667
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
/**
|
||||
* Short description for class.
|
||||
*
|
||||
* @package cake.tests
|
||||
* @subpackage cake.tests.fixtures
|
||||
*/
|
||||
class ContentFixture extends CakeTestFixture {
|
||||
/**
|
||||
* name property
|
||||
*
|
||||
* @var string 'Aco'
|
||||
* @access public
|
||||
*/
|
||||
var $name = 'Content';
|
||||
var $table = 'Content';
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $fields = array(
|
||||
'iContentId' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'cDescription' => array('type' => 'string', 'length' => 50, 'null' => true)
|
||||
);
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $records = array(
|
||||
array('cDescription' => 'Test Content 1'),
|
||||
array('cDescription' => 'Test Content 2'),
|
||||
array('cDescription' => 'Test Content 3'),
|
||||
array('cDescription' => 'Test Content 4')
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue