2006-04-14 00:37:28 +04:00
|
|
|
<?php
|
2006-06-07 00:37:56 +04:00
|
|
|
require_once("UnitTestCase.php");
|
2006-04-14 00:37:28 +04:00
|
|
|
class Doctrine_ManagerTestCase extends Doctrine_UnitTestCase {
|
|
|
|
public function testGetInstance() {
|
|
|
|
$this->assertTrue(Doctrine_Manager::getInstance() instanceOf Doctrine_Manager);
|
|
|
|
}
|
|
|
|
public function testOpenSession() {
|
|
|
|
$this->assertTrue($this->session instanceOf Doctrine_Session);
|
|
|
|
}
|
|
|
|
public function testGetIterator() {
|
|
|
|
$this->assertTrue($this->manager->getIterator() instanceof ArrayIterator);
|
|
|
|
}
|
|
|
|
public function testCount() {
|
|
|
|
$this->assertEqual(count($this->manager),1);
|
|
|
|
}
|
|
|
|
public function testGetCurrentSession() {
|
|
|
|
$this->assertEqual($this->manager->getCurrentSession(), $this->session);
|
|
|
|
}
|
|
|
|
public function testGetSessions() {
|
|
|
|
$this->assertEqual(count($this->manager->getSessions()),1);
|
|
|
|
}
|
2006-05-15 16:15:20 +04:00
|
|
|
public function prepareData() { }
|
|
|
|
public function prepareTables() { }
|
2006-04-14 00:37:28 +04:00
|
|
|
}
|
|
|
|
?>
|