1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00

- New tests (code coverage++)

This commit is contained in:
Felipe Pena
2011-06-19 12:33:49 +00:00
parent 772768f41c
commit fbb5aae32c
2 changed files with 32 additions and 0 deletions
@@ -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
@@ -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"