summaryrefslogtreecommitdiff
path: root/tests/simple_unit/ActiveRecord/SqliteTestCase.php
blob: 7d860b9a14e2a5fb9e08c0a9a9dc1b0ffdb415d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
Prado::using('System.Data.ActiveRecord.TActiveRecord');
require_once(dirname(__FILE__).'/records/SqliteUsers.php');

class SqliteTestCase extends UnitTestCase
{
	function setup()
	{
		$conn = new TDbConnection('sqlite2:'.dirname(__FILE__).'/ar_test.db');
		TActiveRecordManager::getInstance()->setDbConnection($conn);
	}

	function test_finder()
	{
		$finder = SqliteUsers::finder();
		$user = $finder->findByPk('test');
		$this->assertNotNull($user);
	}
}

?>