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