Skip to content

Commit 61e62a4

Browse files
authored
Update ext/{pdo_sqlite,sqlite3} tests (#21198)
- Added SKIPIF sections for tests that use Pdo\Sqlite::DETERMINISTIC as it is available since libsqlite 3.8.3. - Removed outdated SKIPIF sections for libsqlite versions 3.7.4 When using libsqlite 3.7.17 there are two more failing tests due to different warning messages: - ext/sqlite3/tests/sqlite3_38_extended_error.phpt - ext/sqlite3/tests/sqlite3_39_toggleExtended.phpt This fix doesn't address these as minimum required libsqlite will be updated in the future PHP versions anyway at some point and this won't be an issue anymore then.
1 parent dcf6533 commit 61e62a4

9 files changed

Lines changed: 19 additions & 15 deletions

ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PDO_sqlite: Testing sqliteCreateFunction() with flags
44
pdo_sqlite
55
--SKIPIF--
66
<?php
7-
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip system sqlite is too old');
7+
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
88
?>
99
--FILE--
1010
<?php

ext/pdo_sqlite/tests/php_8.5_deprecations.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
PDO_sqlite: PHP 8.5 deprecations
33
--EXTENSIONS--
44
pdo_sqlite
5+
--SKIPIF--
6+
<?php
7+
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
8+
?>
59
--FILE--
610
<?php
711

ext/pdo_sqlite/tests/subclasses/pdo_sqlite_constants.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
PDO_sqlite: Testing constants exist
33
--EXTENSIONS--
44
pdo_sqlite
5+
--SKIPIF--
6+
<?php
7+
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
8+
?>
59
--FILE--
610
<?php
711

ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PDO_sqlite: Testing createFunction() with flags
44
pdo_sqlite
55
--SKIPIF--
66
<?php
7-
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip system sqlite is too old');
7+
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
88
?>
99
--FILE--
1010
<?php

ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Pdo\Sqlite basic
33
--EXTENSIONS--
44
pdo_sqlite
5+
--SKIPIF--
6+
<?php
7+
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
8+
?>
59
--FILE--
610
<?php
711

ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Pdo\Sqlite create through PDO::connect and function define.
33
--EXTENSIONS--
44
pdo_sqlite
5+
--SKIPIF--
6+
<?php
7+
if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
8+
?>
59
--FILE--
610
<?php
711

ext/sqlite3/tests/sqlite3_35_stmt_readonly.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
SQLite3_stmt::readOnly check
33
--EXTENSIONS--
44
sqlite3
5-
--SKIPIF--
6-
<?php
7-
$version = SQLite3::version();
8-
if ($version['versionNumber'] < 3007004) {
9-
die("skip");
10-
}
11-
?>
125
--FILE--
136
<?php
147

ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SQLite3::createFunction - Test with flags
44
sqlite3
55
--SKIPIF--
66
<?php
7-
if (!defined('SQLITE3_DETERMINISTIC')) die('skip system sqlite is too old');
7+
if (!defined('SQLITE3_DETERMINISTIC')) die('skip SQLITE3_DETERMINISTIC requires SQLite library >= 3.8.3');
88
?>
99
--FILE--
1010
<?php

ext/sqlite3/tests/sqlite3_stmt_busy.phpt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
SQLite3_stmt::busy
33
--EXTENSIONS--
44
sqlite3
5-
--SKIPIF--
6-
<?php
7-
$version = SQLite3::version();
8-
if ($version['versionNumber'] < 3007004) die("skip");
9-
?>
105
--FILE--
116
<?php
127

0 commit comments

Comments
 (0)