Skip to content

Commit

Permalink
Adding error expectation to model_write test. Models using useTable =…
Browse files Browse the repository at this point in the history
… false, will still issue count queries to their datasources when exists() is called.
  • Loading branch information
markstory committed Jan 17, 2010
1 parent 3be28fc commit 5203397
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cake/tests/cases/libs/model/model_write.test.php
Expand Up @@ -2558,8 +2558,12 @@ function testRecordExists() {

$TestModel =& new TheVoid();
$this->assertFalse($TestModel->exists());

$TestModel->id = 5;
$this->expectError();
ob_start();
$this->assertFalse($TestModel->exists());
$output = ob_get_clean();
}

/**
Expand Down

0 comments on commit 5203397

Please sign in to comment.