cvs: php-src /ext/sqlite/tests sqlite_oo_029.phpt

From: Date: Sat, 27 Dec 2003 21:45:51 +0000
Subject: cvs: php-src /ext/sqlite/tests sqlite_oo_029.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-25448@lists.php.net to get a copy of this message
helly Sat Dec 27 16:45:51 2003 EDT Added files: /php-src/ext/sqlite/tests sqlite_oo_029.phpt Log: Add new test related to bug #25329. Index: php-src/ext/sqlite/tests/sqlite_oo_029.phpt +++ php-src/ext/sqlite/tests/sqlite_oo_029.phpt --TEST-- sqlite-oo: call method with $this --FILE-- <?php include "blankdb_oo.inc"; $db->query("CREATE TABLE strings(key VARCHAR(10), var VARCHAR(10))"); $db->query("INSERT INTO strings VALUES('foo', 'foo')"); class sqlite_help { function sqlite_help($db){ $this->db = $db; $this->db->create_function('link_keywords', array(&$this, 'linkers'), 1); return $this->db; } function get_single($key) { return $this->db->single_query('SELECT link_keywords(var) FROM strings WHERE key=\''.$key.'\'', 1); } function linkers($str) { $str = str_replace('foo', 'bar', $str); return $str; } function free() { unset($this->db); } function __destruct() { echo "DESTRUCTED\n"; } } $obj = new sqlite_help($db); echo $obj->get_single('foo')."\n";; $obj->free(); unset($obj); ?> ===DONE=== --EXPECT-- bar ===DONE=== DESTRUCTED

« previous php.cvs (#25448) next »