From dc3bf922d9715bfd1b2105be04a9aabc84a1d7d4 Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 12 Apr 2007 08:05:03 +0000 Subject: Refactor and add TTableGateway, System.Data.Common, System.Data.DataGateway --- .../ActiveRecord/RecordEventTestCase.php | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/simple_unit/ActiveRecord/RecordEventTestCase.php (limited to 'tests/simple_unit/ActiveRecord/RecordEventTestCase.php') diff --git a/tests/simple_unit/ActiveRecord/RecordEventTestCase.php b/tests/simple_unit/ActiveRecord/RecordEventTestCase.php new file mode 100644 index 00000000..c669bb72 --- /dev/null +++ b/tests/simple_unit/ActiveRecord/RecordEventTestCase.php @@ -0,0 +1,33 @@ +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); + } + + function logger($sender, $param) + { + var_dump($param->Command->Text); + } +} + +?> \ No newline at end of file -- cgit v1.2.3