Permalink
Browse files

Adding conditional check for errors only generated in PHP5.3

  • Loading branch information...
1 parent 0ba93bd commit ace784aab53638f068faf3dec1ba8bf97ef18c2f @markstory markstory committed Oct 5, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 cake/tests/cases/libs/model/model_read.test.php
View
4 cake/tests/cases/libs/model/model_read.test.php
@@ -4883,7 +4883,9 @@ function testCallbackSourceChange() {
$this->assertEqual(3, count($TestModel->find('all')));
$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')));
}

0 comments on commit ace784a

Please sign in to comment.