diff options
-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" |