1
0
mirror of synced 2024-12-13 06:46:03 +03:00
doctrine2/tests/ManagerTestCase.class.php

24 lines
857 B
PHP
Raw Normal View History

2006-04-14 00:37:28 +04:00
<?php
require_once("UnitTestCase.class.php");
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);
}
}
?>