From d2bff7d31ab3fa77e9abb7a6c53c241a62872b29 Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 4 Jan 2008 18:23:32 +0000 Subject: [PATCH] added tests for updating I18n records, fixes #672 --- tests/I18nTestCase.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/I18nTestCase.php b/tests/I18nTestCase.php index 769755ff7..3251750e7 100644 --- a/tests/I18nTestCase.php +++ b/tests/I18nTestCase.php @@ -93,6 +93,19 @@ class Doctrine_I18n_TestCase extends Doctrine_UnitTestCase $this->assertEqual($t->lang, 'EN'); } + + public function testUpdatingI18nItems() + { + $i = Doctrine_Query::create()->query('FROM I18nTest')->getFirst(); + + $i->Translation['EN']->name = 'updated name'; + $i->Translation['EN']->title = 'updated title'; + + $i->Translation->save(); + + $this->assertEqual($t->name, 'updated name'); + $this->assertEqual($t->title, 'updated title'); + } public function testDataFetching() {