diff options
author | Christian Schneider | 2023-01-30 11:15:11 +0100 |
---|---|---|
committer | Christian Schneider | 2023-01-30 11:15:11 +0100 |
commit | ed2ae9d2124d262d7897701ba97d4e670e150d76 (patch) | |
tree | 06dafd6d583a973b053e632fb23cb697fe3c822a /test/it_dbi.t | |
parent | 58feaf1507f89e07a68c50174ad6b1bc73d4e30f (diff) | |
download | itools-ed2ae9d2124d262d7897701ba97d4e670e150d76.tar.gz itools-ed2ae9d2124d262d7897701ba97d4e670e150d76.tar.bz2 itools-ed2ae9d2124d262d7897701ba97d4e670e150d76.zip |
Make it_dbi base object iterable, simplify code, add tests
Diffstat (limited to 'test/it_dbi.t')
-rwxr-xr-x | test/it_dbi.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t index eef2632..2a601b6 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -270,6 +270,14 @@ foreach (new it_dbi_test as $id => $record) is($count, 3, "Iterator without select"); $count = 0; +foreach (new it_dbi($db + ['table' => 'it_dbi_test']) as $id => $record) +{ + $count++; + is($record->_key, $id, "Iterator id $id (it_dbi object)"); +} +is($count, 3, "Iterator without select (it_dbi_object)"); + +$count = 0; foreach (new it_dbi_test(['foo <>' => ""]) as $id => $record) { $count++; |