2008-02-08 19:35:27 +00:00
|
|
|
<?php
|
2008-02-08 23:20:35 +00:00
|
|
|
require_once 'lib/DoctrineTestInit.php';
|
2008-02-08 19:35:27 +00:00
|
|
|
|
2008-02-09 18:59:19 +00:00
|
|
|
class Orm_Component_TestTest extends Doctrine_OrmTestCase
|
2008-02-08 19:35:27 +00:00
|
|
|
{
|
2008-02-10 14:32:05 +00:00
|
|
|
protected function setUp()
|
|
|
|
{
|
2008-02-10 17:29:24 +00:00
|
|
|
parent::setUp();
|
2008-02-11 22:33:12 +00:00
|
|
|
$this->loadFixtures('forum', 'common', array('users', 'admins'));
|
2008-02-10 14:32:05 +00:00
|
|
|
}
|
|
|
|
|
2008-02-08 19:35:27 +00:00
|
|
|
public function testTest()
|
|
|
|
{
|
|
|
|
$this->assertEquals(0, 0);
|
|
|
|
}
|
2008-02-10 15:10:29 +00:00
|
|
|
|
|
|
|
public function testFixture()
|
|
|
|
{
|
2008-02-11 19:56:26 +00:00
|
|
|
$forumUsers = $this->sharedFixture['connection']->query("FROM ForumUser u");
|
2008-02-10 15:10:29 +00:00
|
|
|
$this->assertEquals(2, count($forumUsers));
|
|
|
|
$forumUsers[0]->delete();
|
|
|
|
unset($forumUsers[0]);
|
|
|
|
$this->assertEquals(1, count($forumUsers));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testFixture2()
|
|
|
|
{
|
2008-02-11 19:56:26 +00:00
|
|
|
$forumUsers = $this->sharedFixture['connection']->query("FROM ForumUser u");
|
2008-02-10 15:10:29 +00:00
|
|
|
$this->assertEquals(2, count($forumUsers));
|
|
|
|
}
|
2008-02-08 19:35:27 +00:00
|
|
|
}
|