diff options
author | Felipe Pena <felipe@php.net> | 2011-06-19 12:33:49 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-06-19 12:33:49 +0000 |
commit | fbb5aae32c5eb04bc5ff35efd915e467afd0a3da (patch) | |
tree | f7ac2480c18a144a4de06295f887c4d26f8ee03e | |
parent | 772768f41c658c63fb21fb7f1248f2ede1bad0be (diff) | |
download | php-git-fbb5aae32c5eb04bc5ff35efd915e467afd0a3da.tar.gz |
- New tests (code coverage++)
-rw-r--r-- | ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt | 17 | ||||
-rw-r--r-- | ext/pdo_sqlite/tests/pdo_sqlite_get_attribute.phpt | 15 |
2 files changed, 32 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt new file mode 100644 index 0000000000..671e4b3454 --- /dev/null +++ b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt @@ -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 diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_get_attribute.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_get_attribute.phpt new file mode 100644 index 0000000000..d6e095d54a --- /dev/null +++ b/ext/pdo_sqlite/tests/pdo_sqlite_get_attribute.phpt @@ -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" |