- New tests (code coverage++)

This commit is contained in:
Felipe Pena 2011-06-19 12:33:49 +00:00
parent 3964ddd1c4
commit f4554096e1
2 changed files with 32 additions and 0 deletions

View 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

View 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"