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);
|
|
|
|
}
|
2006-08-22 03:20:33 +04:00
|
|
|
public function testOpenConnection() {
|
|
|
|
$this->assertTrue($this->connection instanceOf Doctrine_Connection);
|
2006-04-14 00:37:28 +04:00
|
|
|
}
|
|
|
|
public function testGetIterator() {
|
|
|
|
$this->assertTrue($this->manager->getIterator() instanceof ArrayIterator);
|
|
|
|
}
|
|
|
|
public function testCount() {
|
|
|
|
$this->assertEqual(count($this->manager),1);
|
|
|
|
}
|
2006-08-22 03:20:33 +04:00
|
|
|
public function testGetCurrentConnection() {
|
|
|
|
$this->assertEqual($this->manager->getCurrentConnection(), $this->connection);
|
2006-04-14 00:37:28 +04:00
|
|
|
}
|
2006-08-22 03:20:33 +04:00
|
|
|
public function testGetConnections() {
|
|
|
|
$this->assertEqual(count($this->manager->getConnections()),1);
|
2006-08-22 23:34:40 +04:00
|
|
|
}
|
|
|
|
public function testClassifyTableize() {
|
|
|
|
$name = "Forum_Category";
|
|
|
|
$this->assertEqual(Doctrine::tableize($name), "forum__category");
|
|
|
|
$this->assertEqual(Doctrine::classify(Doctrine::tableize($name)), $name);
|
|
|
|
|
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
}
|
2006-05-15 16:15:20 +04:00
|
|
|
public function prepareData() { }
|
|
|
|
public function prepareTables() { }
|
2006-04-14 00:37:28 +04:00
|
|
|
}
|
|
|
|
?>
|