diff options
Diffstat (limited to 'ext/sqlite/tests')
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_010.phpt | 2 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_013.phpt | 4 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_016.phpt | 4 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_020.phpt | 6 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_024.phpt | 4 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_026.phpt | 2 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_031.phpt | 2 |
7 files changed, 14 insertions, 10 deletions
diff --git a/ext/sqlite/tests/sqlite_oo_010.phpt b/ext/sqlite/tests/sqlite_oo_010.phpt index c27d538d7d..bb1fc638eb 100755 --- a/ext/sqlite/tests/sqlite_oo_010.phpt +++ b/ext/sqlite/tests/sqlite_oo_010.phpt @@ -22,7 +22,7 @@ foreach ($data as $str) { } $r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); -while ($row = $r->hasMore()) { +while ($row = $r->valid()) { var_dump($r->current()); $r->next(); } diff --git a/ext/sqlite/tests/sqlite_oo_013.phpt b/ext/sqlite/tests/sqlite_oo_013.phpt index 3aedecc6a8..022e6f8083 100755 --- a/ext/sqlite/tests/sqlite_oo_013.phpt +++ b/ext/sqlite/tests/sqlite_oo_013.phpt @@ -22,7 +22,7 @@ foreach ($data as $str) { echo "====BUFFERED====\n"; $r = $db->query("SELECT a, b from strings"); -while ($r->hasMore()) { +while ($r->valid()) { var_dump($r->current(SQLITE_NUM)); var_dump($r->column(0)); var_dump($r->column(1)); @@ -32,7 +32,7 @@ while ($r->hasMore()) { } echo "====UNBUFFERED====\n"; $r = $db->unbuffered_query("SELECT a, b from strings"); -while ($r->hasMore()) { +while ($r->valid()) { var_dump($r->column(0)); var_dump($r->column('b')); var_dump($r->column(1)); diff --git a/ext/sqlite/tests/sqlite_oo_016.phpt b/ext/sqlite/tests/sqlite_oo_016.phpt index a9b3e2760e..ac3dac31ca 100755 --- a/ext/sqlite/tests/sqlite_oo_016.phpt +++ b/ext/sqlite/tests/sqlite_oo_016.phpt @@ -22,12 +22,12 @@ foreach ($data as $str) { echo "====BUFFERED====\n"; $r = $db->query("SELECT a, b from strings"); -while ($r->hasMore()) { +while ($r->valid()) { var_dump($r->fetch_single()); } echo "====UNBUFFERED====\n"; $r = $db->unbuffered_query("SELECT a, b from strings"); -while ($r->hasMore()) { +while ($r->valid()) { var_dump($r->fetch_single()); } echo "DONE!\n"; diff --git a/ext/sqlite/tests/sqlite_oo_020.phpt b/ext/sqlite/tests/sqlite_oo_020.phpt index 49adaea8b1..021e176917 100755 --- a/ext/sqlite/tests/sqlite_oo_020.phpt +++ b/ext/sqlite/tests/sqlite_oo_020.phpt @@ -21,6 +21,10 @@ try { } catch(sqlite_exception $err) { echo "Message: ".$err->getMessage()."\n"; echo "File: ".$err->getFile()."\n"; + echo "File: ".$err->getCode()."\n"; + echo "Line: ".$err->getLine()."\n"; + print_r($err->getTrace()); + echo "BackTrace: ".$err->getTraceAsString()."\n"; } $db = sqlite_factory($dbname); @@ -37,7 +41,7 @@ foreach ($data as $str) { } $r = $db->unbuffered_query("SELECT a, b from strings"); -while ($r->hasMore()) { +while ($r->valid()) { var_dump($r->current(SQLITE_NUM)); $r->next(); } diff --git a/ext/sqlite/tests/sqlite_oo_024.phpt b/ext/sqlite/tests/sqlite_oo_024.phpt index f1f89d9acc..457d8a502c 100755 --- a/ext/sqlite/tests/sqlite_oo_024.phpt +++ b/ext/sqlite/tests/sqlite_oo_024.phpt @@ -29,13 +29,13 @@ foreach ($data as $str) { echo "====class24====\n"; $res = $db->query("SELECT a FROM strings", SQLITE_ASSOC); -while ($res->hasMore()) { +while ($res->valid()) { var_dump($res->fetch_object('class24')); } echo "====stdclass====\n"; $res = $db->query("SELECT a FROM strings", SQLITE_ASSOC); -while ($res->hasMore()) { +while ($res->valid()) { var_dump($res->fetch_object()); } diff --git a/ext/sqlite/tests/sqlite_oo_026.phpt b/ext/sqlite/tests/sqlite_oo_026.phpt index f9e2503b76..ae0df40d3d 100755 --- a/ext/sqlite/tests/sqlite_oo_026.phpt +++ b/ext/sqlite/tests/sqlite_oo_026.phpt @@ -30,7 +30,7 @@ foreach($r as $idx => $row) { } echo "====FOR====\n"; $r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); -for(;$r->hasMore(); $r->next()) { +for(;$r->valid(); $r->next()) { $v = $r->column(0); var_dump($v); $c = $r->column(0); diff --git a/ext/sqlite/tests/sqlite_oo_031.phpt b/ext/sqlite/tests/sqlite_oo_031.phpt index 84e6861654..80a2138cbf 100755 --- a/ext/sqlite/tests/sqlite_oo_031.phpt +++ b/ext/sqlite/tests/sqlite_oo_031.phpt @@ -70,7 +70,7 @@ class SqliteNestedset implements RecursiveIterator $this->fetch(); } - function hasMore() + function valid() { return is_object($this->entry); } |