mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Updating model test for slow DB connections
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7028 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
54715db5dd
commit
88b16a1d6c
1 changed files with 4 additions and 4 deletions
|
@ -346,14 +346,14 @@ class ModelTest extends CakeTestCase {
|
||||||
|
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
$ts = date('Y-m-d H:i:s');
|
||||||
$TestModel->id = 1;
|
$TestModel->id = 1;
|
||||||
$data = array(
|
$data = array(
|
||||||
'JoinA' => array('id' => '1', 'name' => 'New name for Join A 1'),
|
'JoinA' => array('id' => '1', 'name' => 'New name for Join A 1', 'updated' => $ts),
|
||||||
'JoinB' => array(array('id' => 1, 'join_b_id' => 2, 'other' => 'New data for Join A 1 Join B 2')),
|
'JoinB' => array(array('id' => 1, 'join_b_id' => 2, 'other' => 'New data for Join A 1 Join B 2', 'created' => $ts, 'updated' => $ts)),
|
||||||
'JoinC' => array(array('id' => 1, 'join_c_id' => 2, 'other' => 'New data for Join A 1 Join C 2')));
|
'JoinC' => array(array('id' => 1, 'join_c_id' => 2, 'other' => 'New data for Join A 1 Join C 2', 'created' => $ts, 'updated' => $ts)));
|
||||||
$TestModel->set($data);
|
$TestModel->set($data);
|
||||||
$TestModel->save();
|
$TestModel->save();
|
||||||
$ts = date('Y-m-d H:i:s');
|
|
||||||
|
|
||||||
$result = $TestModel->findById(1);
|
$result = $TestModel->findById(1);
|
||||||
$expected = array(
|
$expected = array(
|
||||||
|
|
Loading…
Reference in a new issue