Fixing Model test that causes a fatal error on PHP > 5.1.6 and PHP 4.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5602 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-08-29 04:59:57 +00:00
parent b8c31ae9f9
commit 51418a07da

View file

@ -1456,9 +1456,9 @@ function testRecursiveFindAllWithLimit() {
$noAfterFindData = $noAfterFindModel->findAll();
$this->assertFalse($afterFindModel == $noAfterFindModel);
// Limitation of PHP 4 when comparing objects
if (PHP5) {
$this->assertTrue($afterFindModel == $duplicateModel);
// Limitation of PHP 4 and PHP 5 > 5.1.6 when comparing recursive objects
if (PHP_VERSION === '5.1.6') {
$this->assertFalse($afterFindModel != $duplicateModel);
}
$this->assertEqual($afterFindData, $noAfterFindData);