1
0
mirror of synced 2025-01-29 19:41:45 +03:00

Migrating test cases to be PHP 5.2 compliant

This commit is contained in:
zYne 2007-02-15 22:20:44 +00:00
parent eebe47f0fa
commit bb1cf022a3
4 changed files with 6 additions and 7 deletions

View File

@ -44,7 +44,7 @@ class Doctrine_Manager_TestCase extends Doctrine_UnitTestCase {
$this->assertTrue(is_integer(count($this->manager)));
}
public function testGetCurrentConnection() {
$this->assertEqual($this->manager->getCurrentConnection(), $this->connection);
$this->assertTrue($this->manager->getCurrentConnection() === $this->connection);
}
public function testGetConnections() {
$this->assertTrue(is_integer(count($this->manager->getConnections())));

View File

@ -114,7 +114,5 @@ class Doctrine_Relation_TestCase extends Doctrine_UnitTestCase {
$this->assertTrue($user->getTable()->getRelation('Phonenumber') instanceof Doctrine_Relation_ForeignKey);
$this->manager->setAttribute(Doctrine::ATTR_CREATE_TABLES, true);
}
}
}

View File

@ -83,7 +83,7 @@ class Doctrine_TreeStructure_TestCase extends Doctrine_UnitTestCase
$this->assertTrue(count($o1->get('Children')) == 2);
$this->assertTrue(isset($o2->Parent));
$this->assertTrue($o2->Parent == $o1);
$this->assertTrue($o2->Parent === $o1);
$this->assertTrue(count($o4->Children) == 0);
$this->assertFalse(isset($o4->Parent));

View File

@ -38,8 +38,9 @@ class Doctrine_View_TestCase extends Doctrine_UnitTestCase {
$view = new Doctrine_View($query, 'MyView');
$this->assertEqual($view->getName(), 'MyView');
$this->assertEqual($view->getQuery(), $query);
$this->assertEqual($view, $query->getView());
$this->assertTrue($view->getQuery() === $query);
$this->assertTrue($view === $query->getView());
$this->assertTrue($view->getConnection() instanceof Doctrine_Connection);
$success = true;