diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /tests/simple_unit/ActiveRecord/RecordEventTestCase.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'tests/simple_unit/ActiveRecord/RecordEventTestCase.php')
-rw-r--r-- | tests/simple_unit/ActiveRecord/RecordEventTestCase.php | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/tests/simple_unit/ActiveRecord/RecordEventTestCase.php b/tests/simple_unit/ActiveRecord/RecordEventTestCase.php index f6009608..3e98d46b 100644 --- a/tests/simple_unit/ActiveRecord/RecordEventTestCase.php +++ b/tests/simple_unit/ActiveRecord/RecordEventTestCase.php @@ -1,37 +1,37 @@ -<?php
-Prado::using('System.Data.ActiveRecord.TActiveRecord');
-require_once(dirname(__FILE__).'/records/UserRecord.php');
-
-class RecordEventTestCase extends UnitTestCase
-{
- function setup()
- {
- $conn = new TDbConnection('pgsql:host=localhost;dbname=test', 'test','test');
- TActiveRecordManager::getInstance()->setDbConnection($conn);
- }
-
- function testFindByPk()
- {
- $user1 = UserRecord::finder()->findByPk('admin');
- $this->assertNotNull($user1);
- }
-
- function test_same_data_returns_same_object()
- {
- $criteria = new TActiveRecordCriteria('username = ?', 'admin');
- $finder = new UserRecord();
- $finder->OnCreateCommand[] = array($this, 'logger');
- $finder->OnExecuteCommand[] = array($this, 'logger');
- $user1 = $finder->find($criteria);
- //var_dump($user1);
-
- //var_dump(UserRecord::finder()->find($criteria));
- }
-
- function logger($sender, $param)
- {
- //var_dump($param);
- }
-}
-
+<?php +Prado::using('System.Data.ActiveRecord.TActiveRecord'); +require_once(dirname(__FILE__).'/records/UserRecord.php'); + +class RecordEventTestCase extends UnitTestCase +{ + function setup() + { + $conn = new TDbConnection('pgsql:host=localhost;dbname=test', 'test','test'); + TActiveRecordManager::getInstance()->setDbConnection($conn); + } + + function testFindByPk() + { + $user1 = UserRecord::finder()->findByPk('admin'); + $this->assertNotNull($user1); + } + + function test_same_data_returns_same_object() + { + $criteria = new TActiveRecordCriteria('username = ?', 'admin'); + $finder = new UserRecord(); + $finder->OnCreateCommand[] = array($this, 'logger'); + $finder->OnExecuteCommand[] = array($this, 'logger'); + $user1 = $finder->find($criteria); + //var_dump($user1); + + //var_dump(UserRecord::finder()->find($criteria)); + } + + function logger($sender, $param) + { + //var_dump($param); + } +} + ?>
\ No newline at end of file |