diff --git a/tests/BooleanTestCase.php b/tests/BooleanTestCase.php index 7a10b2f4b..7d199bbb3 100644 --- a/tests/BooleanTestCase.php +++ b/tests/BooleanTestCase.php @@ -41,27 +41,27 @@ class Doctrine_Boolean_TestCase extends Doctrine_UnitTestCase { $test = new BooleanTest(); $test->is_working = false; - $this->assertEqual($test->is_working, false); + $this->assertIdentical($test->is_working, false); $this->assertEqual($test->state(), Doctrine_Record::STATE_TDIRTY); $test->save(); $test->refresh(); - $this->assertEqual($test->is_working, false); + $this->assertIdentical($test->is_working, false); } public function testSetTrue() { $test = new BooleanTest(); $test->is_working = true; - $this->assertEqual($test->is_working, true); + $this->assertIdentical($test->is_working, true); $test->save(); $test->refresh(); - $this->assertEqual($test->is_working, true); + $this->assertIdentical($test->is_working, true); $this->connection->clear(); $test = $test->getTable()->find($test->id); - $this->assertEqual($test->is_working, true); + $this->assertIdentical($test->is_working, true); } public function testNormalQuerying() { $query = new Doctrine_Query($this->connection); @@ -97,22 +97,22 @@ class Doctrine_Boolean_TestCase extends Doctrine_UnitTestCase { $test = new BooleanTest(); $this->is_working = null; - $this->assertEqual($this->is_working, null); + $this->assertIdentical($this->is_working, null); $this->assertEqual($test->state(), Doctrine_Record::STATE_TDIRTY); $test->save(); $test->refresh(); - $this->assertEqual($test->is_working, null); + $this->assertIdentical($test->is_working, null); $test = new BooleanTest(); $this->is_working_notnull = null; - $this->assertEqual($this->is_working_notnull, false); + $this->assertIdentical($this->is_working_notnull, false); $this->assertEqual($test->state(), Doctrine_Record::STATE_TDIRTY); $test->save(); $test->refresh(); - $this->assertEqual($test->is_working_notnull, false); + $this->assertIdentical($test->is_working_notnull, false); } } diff --git a/tests/Test.php b/tests/Test.php index c2765b123..a6e2fa055 100644 --- a/tests/Test.php +++ b/tests/Test.php @@ -71,6 +71,16 @@ class UnitTestCase $this->_fail(); } } + + public function assertIdentical($value, $value2) + { + if ($value === $value2) { + $this->_passed++; + } else { + $this->_fail(); + } + } + public function assertNotEqual($value, $value2) { if ($value != $value2) {