diff options
author | Christian Schneider | 2011-04-13 15:35:19 +0000 |
---|---|---|
committer | Christian Schneider | 2011-04-13 15:35:19 +0000 |
commit | 8d4bd65f9d80902a8c82126648011e145f686cc1 (patch) | |
tree | 6cca9f4669e8a7a50ecf6290f259f1d922a78fdd /tests/it_dbi.t | |
parent | 5ab78a46ebfab91a9a8fa0f7d6e4da5a7ff4d43e (diff) | |
download | itools-8d4bd65f9d80902a8c82126648011e145f686cc1.tar.gz itools-8d4bd65f9d80902a8c82126648011e145f686cc1.tar.bz2 itools-8d4bd65f9d80902a8c82126648011e145f686cc1.zip |
Fix iteration over localized fields, added test for it
Diffstat (limited to 'tests/it_dbi.t')
-rwxr-xr-x | tests/it_dbi.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/it_dbi.t b/tests/it_dbi.t index c885930..4a58188 100755 --- a/tests/it_dbi.t +++ b/tests/it_dbi.t @@ -227,14 +227,22 @@ $dbi->query('create temporary table it_dbi_testlocalized ( $record = new it_dbi($db + array('table' => "it_dbi_testlocalized")); $record->insert(array('foobar_de' => "deutsch", 'foobar_fr' => "franz")); +$record->insert(array('foobar_de' => "deutsch2", 'foobar_fr' => "franz2")); T_set_language('de'); -$record->read(1); +$record->select(array()); +$record->iterate(); is( array($record->_key, $record->foobar), array(1, "deutsch"), "localized field foobar_de" ); +$record->iterate(); +is( + array($record->_key, $record->foobar), + array(2, "deutsch2"), + "localized field foobar_de iterate" +); T_set_language('fr'); $record->read(1); |