We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e98d65 commit ed1e816Copy full SHA for ed1e816
tests/Database/Connection.getInsertId().postgre.phpt
@@ -21,10 +21,13 @@ $connection->query('
21
');
22
23
$connection->query('INSERT INTO primarykey (prim) VALUES (5)');
24
-Assert::equal('0', $connection->getInsertId());
25
-
26
-$connection->query('INSERT INTO primarykey (prim) VALUES (6)');
27
+if (PHP_VERSION_ID >= 70016) {
+ Assert::exception(function () use ($connection) {
+ $connection->getInsertId();
+ }, Nette\Database\DriverException::class);
28
+} else {
29
+ Assert::equal('0', $connection->getInsertId());
30
+}
31
32
33
$connection->query('
0 commit comments