helly           Sat Apr 23 11:21:07 2005 EDT

  Added files:                 
    /php-src/tests/classes      __set__get_004.phpt 
    /php-src/ext/sqlite/tests/pdo       pdo_024.phpt 
  Log:
  - Add new tests
  

http://cvs.php.net/co.php/php-src/tests/classes/__set__get_004.phpt?r=1.1&p=1
Index: php-src/tests/classes/__set__get_004.phpt
+++ php-src/tests/classes/__set__get_004.phpt
--TEST--
ZE2 __set() and __get()
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip 
ZendEngine 2 needed'); ?>
--FILE--
<?php
class Test {
        protected $x;

        function __get($name) {
                if (isset($this->x[$name])) {
                        return $this->x[$name];
                } 
                else
                {
                        return NULL;
                }
        }

        function __set($name, $val) {
                $this->x[$name] = $val;
        }
}

$foo = new Test();
$bar = new Test();
$bar->baz = "Check";

$foo->bar = $bar;

var_dump($bar->baz);
var_dump($foo->bar->baz);

?>
===DONE===
--EXPECTF--
string(5) "Check"
string(5) "Check"
===DONE===

http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_024.phpt?r=1.1&p=1
Index: php-src/ext/sqlite/tests/pdo/pdo_024.phpt
+++ php-src/ext/sqlite/tests/pdo/pdo_024.phpt
--TEST--
PDO_SQLite2: Bind does not convert NULL
--SKIPIF--
<?php # vim:ft=php
require_once('skipif.inc'); ?>
--FILE--
<?php

require_once('connection.inc');
require_once('prepare.inc');

require_once($PDO_TESTS . 'pdo_024.inc');

?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
bind: success
bool(true)
NULL
===DONE===

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to