xref: /PHP-8.0/ext/pdo_sqlite/tests/bug50728.phpt (revision f8d79582)
1--TEST--
2Bug #50728 (All PDOExceptions hardcode 'code' property to 0)
3--SKIPIF--
4<?php
5if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
6?>
7--FILE--
8<?php
9try {
10    $a = new PDO("sqlite:/this/path/should/not/exist.db");
11} catch (PDOException $e) {
12    var_dump($e->getCode());
13}
14?>
15--EXPECT--
16int(14)
17