1
0
mirror of synced 2025-01-06 00:57:10 +03:00
doctrine2/tests/Orm/Component/TestTest.php
2008-03-23 11:30:29 +00:00

38 lines
1.0 KiB
PHP

<?php
require_once 'lib/DoctrineTestInit.php';
class Orm_Component_TestTest extends Doctrine_OrmTestCase
{
protected function setUp()
{
parent::setUp();
$this->loadFixtures('forum', 'common', array('users', 'admins'));
}
public function testTest()
{
$this->assertEquals(0, 0);
}
public function testFixture()
{
$forumUsers = $this->sharedFixture['connection']->query("FROM ForumUser u");
$this->assertEquals(2, count($forumUsers));
$forumUsers[0]->delete();
unset($forumUsers[0]);
$this->assertEquals(1, count($forumUsers));
}
public function testFixture2()
{
$forumUsers = $this->sharedFixture['connection']->query("FROM ForumUser u");
$this->assertEquals(2, count($forumUsers));
}
public function testFixture3()
{
$forumAdmins = $this->sharedFixture['connection']->query("FROM ForumAdministrator adm");
$this->assertEquals(1, count($forumAdmins));
$forumAdmins[0]->delete();
}
}