1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/ext/sqlite3/tests/sqlite3_34_load_extension_ext_dir.phpt

28 lines
508 B
PHP

--TEST--
SQLite3::loadExtension with disabled extensions
--CREDITS--
Jelle Lampaert
#Belgian Testfest 2009
--SKIPIF--
<?php
require_once(__DIR__ . '/skipif.inc');
if (!method_exists('SQLite3', 'loadExtension')) {
die("skip if SQLITE_OMIT_LOAD_EXTENSION defined");
}
?>
--FILE--
<?php
$db = new SQLite3(':memory:');
try {
$db->loadExtension("");
} catch (Extension $ex) {
var_dump($ex->getMessage());
}
?>
--EXPECTF--
Warning: SQLite3::loadExtension(): SQLite Extension are disabled in %s on line %d