Skip to content
Permalink
Browse files

Fixing more errors in tests related to type casting

  • Loading branch information...
lorenzo committed Oct 26, 2010
1 parent f027bf0 commit cec3512835cfcef3e9ad5bf1b9a986b80627312f
Showing with 7 additions and 6 deletions.
  1. +7 −6 cake/tests/cases/libs/model/model_write.test.php
@@ -439,7 +439,7 @@ public function testCounterCacheWithSelfJoin() {
* @return void
*/
function testSaveWithCounterCacheScope() {
$this->loadFixtures('Syfile', 'Item');
$this->loadFixtures('Syfile', 'Item', 'Image', 'ItemsPortfolio', 'Portfolio');
$TestModel = new Syfile();
$TestModel2 = new Item();
$TestModel2->belongsTo['Syfile']['counterCache'] = true;
@@ -455,12 +455,13 @@ function testSaveWithCounterCacheScope() {
));
$result = $TestModel->findById(1);
$this->assertIdentical($result['Syfile']['item_count'], '1');
debug($result);
$this->assertEquals($result['Syfile']['item_count'], 1);
$TestModel2->id = 1;
$TestModel2->saveField('published', true);
$result = $TestModel->findById(1);
$this->assertIdentical($result['Syfile']['item_count'], '2');
$this->assertEquals($result['Syfile']['item_count'], 2);
$TestModel2->save(array(
'id' => 1,
@@ -469,7 +470,7 @@ function testSaveWithCounterCacheScope() {
));
$result = $TestModel->findById(1);
$this->assertIdentical($result['Syfile']['item_count'], '1');
$this->assertEquals($result['Syfile']['item_count'], 1);
}
/**
@@ -2416,7 +2417,7 @@ function testSaveMultipleHabtm() {
* @return void
*/
function testSaveAll() {
$this->loadFixtures('Post', 'Author', 'Comment', 'Attachment');
$this->loadFixtures('Post', 'Author', 'Comment', 'Attachment', 'Article', 'User');
$TestModel = new Post();
$result = $TestModel->find('all');
@@ -2556,7 +2557,7 @@ function testSaveAll() {
* @return void
*/
function testSaveAllHabtm() {
$this->loadFixtures('Article', 'Tag', 'Comment', 'User');
$this->loadFixtures('Article', 'Tag', 'Comment', 'User', 'ArticlesTag');
$data = array(
'Article' => array(
'user_id' => 1,

0 comments on commit cec3512

Please sign in to comment.
You can’t perform that action at this time.