diff options
author | wei <> | 2007-04-16 02:02:27 +0000 |
---|---|---|
committer | wei <> | 2007-04-16 02:02:27 +0000 |
commit | 4a2ebb333d239b58c19d09ee88646fa0e32e71ed (patch) | |
tree | 9256d53581139ede3df5c2c4aa1c729283f3e74e /tests/simple_unit/ActiveRecord | |
parent | d4df553e7163f8bc8f09f79e058d5815f35ce709 (diff) |
Updates to db stuff, removed js build from build.xml (no longer necessary)
Diffstat (limited to 'tests/simple_unit/ActiveRecord')
-rw-r--r-- | tests/simple_unit/ActiveRecord/RecordEventTestCase.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/simple_unit/ActiveRecord/RecordEventTestCase.php b/tests/simple_unit/ActiveRecord/RecordEventTestCase.php index c669bb72..fad54eb0 100644 --- a/tests/simple_unit/ActiveRecord/RecordEventTestCase.php +++ b/tests/simple_unit/ActiveRecord/RecordEventTestCase.php @@ -9,24 +9,28 @@ class RecordEventTestCase extends UnitTestCase $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');
- $criteria->OnSelect = array($this, 'logger');
- $user1 = UserRecord::finder()->find($criteria);
- //var_dump($user1);
+ $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->Command->Text);
+ var_dump($param);
}
}
|