1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/ManagerTestCase.php

33 lines
1.2 KiB
PHP
Raw Normal View History

2006-04-14 00:37:28 +04:00
<?php
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
}
public function prepareData() { }
public function prepareTables() { }
2006-04-14 00:37:28 +04:00
}
?>