Migrating test cases to be PHP 5.2 compliant
This commit is contained in:
parent
eebe47f0fa
commit
bb1cf022a3
@ -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())));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user