From 1375d1332c76f4823e7357354d7957af9527f48b Mon Sep 17 00:00:00 2001 From: gnat Date: Tue, 24 Jul 2007 19:48:02 +0000 Subject: [PATCH] Added a test case that objects fail to update a field in proxy state. --- tests/Record/StateTestCase.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/Record/StateTestCase.php b/tests/Record/StateTestCase.php index b2158644c..68967d281 100644 --- a/tests/Record/StateTestCase.php +++ b/tests/Record/StateTestCase.php @@ -130,4 +130,20 @@ class Doctrine_Record_State_TestCase extends Doctrine_UnitTestCase { $this->assertEqual($count, count($this->dbh)); } + + public function testAssignFieldsToProxies() { + + $user = new User(); + $user->name = 'someuser'; + $user->password = '123'; + $user->save(); + + $this->connection->clear(); + + $user = $this->connection->queryOne("SELECT u.name FROM User u WHERE u.name = 'someuser'"); + $user->name = 'someother'; + $user->save(); + $this->assertEqual($user->name, 'someother'); + + } }