diff options
| author | Urban Müller | 2012-05-21 16:23:10 +0000 | 
|---|---|---|
| committer | Urban Müller | 2012-05-21 16:23:10 +0000 | 
| commit | 70889fde2ffa8c747b0a11d2712c4642b6c19b83 (patch) | |
| tree | 02e5cb4ccf000e834305586933da9008f142c573 /tests | |
| parent | 6829130db749903ca012e09bc0ba19aaca000449 (diff) | |
| download | itools-70889fde2ffa8c747b0a11d2712c4642b6c19b83.tar.gz itools-70889fde2ffa8c747b0a11d2712c4642b6c19b83.tar.bz2 itools-70889fde2ffa8c747b0a11d2712c4642b6c19b83.zip | |
add store(), fix comments
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/it_dbi.t | 21 | 
1 files changed, 19 insertions, 2 deletions
| diff --git a/tests/it_dbi.t b/tests/it_dbi.t index 762e81f..1ae479f 100755 --- a/tests/it_dbi.t +++ b/tests/it_dbi.t @@ -13,7 +13,7 @@ $dbi->query('create temporary table it_dbi_test (  	primary key(ID)  );'); -$record = new it_dbi($db + array('table' => "it_dbi_test")); +$record  = new it_dbi($db + array('table' => "it_dbi_test"));  $record->insert(array('x' => 42, 'foo' => null));  $record->insert(array('foo' => "bar")); @@ -236,6 +236,24 @@ foreach ($record as $dummy_rec)  	$count++;  is($count, 2, "Iterator reused"); +$record->store(array('ID' => 5, 'x' => 6)); +$record->clear(); +$record->read(5); +is( +	$record->x, +	6, +	"saving with store" +); + +$record->store(array('ID' => 5, 'x' => 7)); +$record->clear(); +$record->read(5); +is( +	$record->x, +	7, +	"updating with store" +); +  # Test field localization feature  $dbi->query('create temporary table it_dbi_testlocalized ( @@ -271,4 +289,3 @@ is(  	array(1, "franz"),  	"localized field foobar_fr"  ); - |