1--TEST--
2SQLite3::lastInsertRowID parameter test
3--CREDITS--
4Jelle Lampaert
5#Belgian Testfest 2009
6--SKIPIF--
7<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
8--FILE--
9<?php
10
11$db = new SQLite3(':memory:');
12
13echo "Creating Table\n";
14var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)'));
15
16echo "Inserting data\n";
17var_dump($db->exec('INSERT INTO test (time, id) VALUES(2, 1)'));
18
19echo "Request last inserted id\n";
20try {
21  $db->lastInsertRowID("");
22} catch (Exception $ex) {
23  var_dump($ex->getMessage());
24}
25
26echo "Closing database\n";
27var_dump($db->close());
28echo "Done";
29?>
30--EXPECTF--
31Creating Table
32bool(true)
33Inserting data
34bool(true)
35Request last inserted id
36
37Warning: SQLite3::lastInsertRowID() expects exactly 0 parameters, %d given in %s on line %d
38Closing database
39bool(true)
40Done
41