diff options
author | Marcus Boerger <helly@php.net> | 2003-12-28 16:26:21 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-12-28 16:26:21 +0000 |
commit | 442c2b4eecb3a01cb91e89ded5b46ae170b6245f (patch) | |
tree | 3aa219257c3ad438ddac7e191104d40526508ac0 /ext/sqlite/tests | |
parent | 1a48fd929dc9ab010879d8a66cc4f8eb5d3af821 (diff) | |
download | php-git-442c2b4eecb3a01cb91e89ded5b46ae170b6245f.tar.gz |
Add a test
Diffstat (limited to 'ext/sqlite/tests')
-rwxr-xr-x | ext/sqlite/tests/sqlite_oo_030.phpt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/sqlite/tests/sqlite_oo_030.phpt b/ext/sqlite/tests/sqlite_oo_030.phpt new file mode 100755 index 0000000000..3f3869baa2 --- /dev/null +++ b/ext/sqlite/tests/sqlite_oo_030.phpt @@ -0,0 +1,44 @@ +--TEST-- +sqlite-oo: calling static methods +--INI-- +sqlite.assoc_case=0 +--SKIPIF-- +<?php # vim:ft=php +if (!extension_loaded("sqlite")) print "skip"; +?> +--FILE-- +<?php + +require_once('blankdb_oo.inc'); + +class foo { + static function bar($param = NULL) { + return $param; + } +} + +function baz($param = NULL) { + return $param; +} + +var_dump($db->single_query("select php('baz')", 1)); +var_dump($db->single_query("select php('baz', 1)", 1)); +var_dump($db->single_query("select php('baz', \"PHP\")", 1)); +var_dump($db->single_query("select php('foo::bar')", 1)); +var_dump($db->single_query("select php('foo::bar', 1)", 1)); +var_dump($db->single_query("select php('foo::bar', \"PHP\")", 1)); +var_dump($db->single_query("select php('foo::bar(\"PHP\")')", 1)); + +?> +===DONE=== +--EXPECTF-- +NULL +string(1) "1" +string(3) "PHP" +NULL +string(1) "1" +string(3) "PHP" + +Warning: sqlite_db::single_query(): call_user_function_ex failed for function foo::bar("PHP")() in %ssqlite_oo_030.php on line %d +bool(false) +===DONE=== |