diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
|---|---|---|
| committer | <> | 2013-04-03 16:25:08 +0000 |
| commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
| tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/pdo/tests/bug_43663.phpt | |
| download | php2-master.tar.gz | |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/pdo/tests/bug_43663.phpt')
| -rw-r--r-- | ext/pdo/tests/bug_43663.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/pdo/tests/bug_43663.phpt b/ext/pdo/tests/bug_43663.phpt new file mode 100644 index 0000000..f8e968f --- /dev/null +++ b/ext/pdo/tests/bug_43663.phpt @@ -0,0 +1,31 @@ +--TEST-- +PDO Common: Bug #43663 (__call on classes derived from PDO) +--SKIPIF-- +<?php # vim:ft=php +if (!extension_loaded('pdo')) die('skip'); +if (!extension_loaded('pdo_sqlite')) die('skip'); +$dir = getenv('REDIR_TEST_DIR'); +if (false == $dir) die('skip no driver'); +require_once $dir . 'pdo_test.inc'; +PDOTest::skip(); +?> +--FILE-- +<?php +class test extends PDO{ + function __call($name, array $args) { + echo "Called $name in ".__CLASS__."\n"; + } + function foo() { + echo "Called foo in ".__CLASS__."\n"; + } +} + +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; + +$a = new test('sqlite::memory:'); +$a->foo(); +$a->bar(); +--EXPECT-- +Called foo in test +Called bar in test |
