added tests for updating I18n records, fixes #672
This commit is contained in:
parent
bb980bb95f
commit
d2bff7d31a
@ -94,6 +94,19 @@ class Doctrine_I18n_TestCase extends Doctrine_UnitTestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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()
|
public function testDataFetching()
|
||||||
{
|
{
|
||||||
$i = Doctrine_Query::create()->from('I18nTest i')->innerJoin('i.Translation t INDEXBY t.lang')->orderby('t.lang')->fetchOne(array(), Doctrine::HYDRATE_ARRAY);
|
$i = Doctrine_Query::create()->from('I18nTest i')->innerJoin('i.Translation t INDEXBY t.lang')->orderby('t.lang')->fetchOne(array(), Doctrine::HYDRATE_ARRAY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user