mirror of
https://github.com/php/php-src.git
synced 2024-12-11 10:54:47 +08:00
- New tests (code coverage++)
This commit is contained in:
parent
3964ddd1c4
commit
f4554096e1
17
ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt
Normal file
17
ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
PDO_sqlite: Testing invalid callback for sqliteCreateAggregate()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$pdo = new PDO('sqlite::memory:');
|
||||
|
||||
$pdo->sqliteCreateAggregate('foo', 'a', '');
|
||||
$pdo->sqliteCreateAggregate('foo', 'strlen', '');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: PDO::sqliteCreateAggregate(): function 'a' is not callable in %s on line %d
|
||||
|
||||
Warning: PDO::sqliteCreateAggregate(): function '' is not callable in %s on line %d
|
15
ext/pdo_sqlite/tests/pdo_sqlite_get_attribute.phpt
Normal file
15
ext/pdo_sqlite/tests/pdo_sqlite_get_attribute.phpt
Normal file
@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
PDO_sqlite: Testing getAttribute()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$pdo = new PDO('sqlite::memory:');
|
||||
var_dump($pdo->getAttribute(PDO::ATTR_SERVER_VERSION));
|
||||
var_dump($pdo->getAttribute(PDO::ATTR_CLIENT_VERSION));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
Loading…
Reference in New Issue
Block a user