Skip to content

Commit

Permalink
Adding conditional check for errors only generated in PHP5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 5, 2009
1 parent 0ba93bd commit ace784a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cake/tests/cases/libs/model/model_read.test.php
Expand Up @@ -4883,7 +4883,9 @@ function testCallbackSourceChange() {
$this->assertEqual(3, count($TestModel->find('all'))); $this->assertEqual(3, count($TestModel->find('all')));


$this->expectError(new PatternExpectation('/Non-existent data source foo/i')); $this->expectError(new PatternExpectation('/Non-existent data source foo/i'));
$this->expectError(new PatternExpectation('/Only variable references/i')); if (defined('PHP_VERSION_ID') && PHP_VERSION_ID >= 50300) {
$this->expectError(new PatternExpectation('/Only variable references/i'));
}
$this->assertFalse($TestModel->find('all', array('connection' => 'foo'))); $this->assertFalse($TestModel->find('all', array('connection' => 'foo')));
} }


Expand Down

0 comments on commit ace784a

Please sign in to comment.