Skip to content

Commit

Permalink
Fixing some errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Oct 26, 2010
1 parent a6b6720 commit f027bf0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cake/tests/cases/libs/model/model_write.test.php
Expand Up @@ -203,8 +203,8 @@ function testZeroDefaultFieldValue() {
$TestModel->create(array());
$TestModel->save();
$result = $TestModel->findById($TestModel->id);
$this->assertIdentical($result['DataTest']['count'], '0');
$this->assertIdentical($result['DataTest']['float'], '0');
$this->assertEquals($result['DataTest']['count'], 0);
$this->assertEquals($result['DataTest']['float'], 0);
}

/**
Expand Down Expand Up @@ -288,20 +288,20 @@ function testSaveWithCounterCache() {
));

$result = $TestModel->findById(1);
$this->assertIdentical($result['Syfile']['item_count'], '2');
$this->assertEquals($result['Syfile']['item_count'], 2);

$TestModel2->delete(1);
$result = $TestModel->findById(1);
$this->assertIdentical($result['Syfile']['item_count'], '1');
$this->assertEquals($result['Syfile']['item_count'], 1);

$TestModel2->id = 2;
$TestModel2->saveField('syfile_id', 1);

$result = $TestModel->findById(1);
$this->assertIdentical($result['Syfile']['item_count'], '2');
$this->assertEquals($result['Syfile']['item_count'], 2);

$result = $TestModel->findById(2);
$this->assertIdentical($result['Syfile']['item_count'], '0');
$this->assertEquals($result['Syfile']['item_count'], 0);
}

/**
Expand Down

0 comments on commit f027bf0

Please sign in to comment.