cvs: pear /PHP_Compat/tests/function array_udiff_uassoc.phpt array_uintersect_uassoc.phpt get_include_path.phpt restore_include_path.phpt
set_include_path.phpt

From: Date: Tue, 31 Aug 2004 11:07:33 +0000
Subject: cvs: pear /PHP_Compat/tests/function array_udiff_uassoc.phpt array_uintersect_uassoc.phpt get_include_path.phpt restore_include_path.phpt
set_include_path.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23527@lists.php.net to get a copy of this message
aidan Tue Aug 31 07:07:33 2004 EDT Modified files: /pear/PHP_Compat/tests/function array_udiff_uassoc.phpt array_uintersect_uassoc.phpt get_include_path.phpt restore_include_path.phpt set_include_path.phpt Log: Fixed http://cvs.php.net/diff.php/pear/PHP_Compat/tests/function/array_udiff_uassoc.phpt?r1=1.3&r2=1.4&ty=u Index: pear/PHP_Compat/tests/function/array_udiff_uassoc.phpt diff -u pear/PHP_Compat/tests/function/array_udiff_uassoc.phpt:1.3 pear/PHP_Compat/tests/function/array_udiff_uassoc.phpt:1.4 --- pear/PHP_Compat/tests/function/array_udiff_uassoc.phpt:1.3 Sat Aug 28 07:02:43 2004 +++ pear/PHP_Compat/tests/function/array_udiff_uassoc.phpt Tue Aug 31 07:07:33 2004 @@ -9,17 +9,17 @@ class cr { - var $priv_member; + var $val; function cr($val) { - $this->priv_member = $val; + $this->val = $val; } function comp_func_cr($a, $b) { - if ($a->priv_member === $b->priv_member) return 0; - return ($a->priv_member > $b->priv_member) ? 1 : -1; + if ($a->val === $b->val) return 0; + return ($a->val > $b->val) ? 1 : -1; } function comp_func_key($a, $b) @@ -33,7 +33,24 @@ $b = array('0.2' => new cr(9), '0.5' => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15)); $result = array_udiff_uassoc($a, $b, array('cr', 'comp_func_cr'), array('cr', 'comp_func_key')); -echo serialize($result); +print_r($result); ?> --EXPECT-- -FIXME \ No newline at end of file +Array +( + [0.1] => cr Object + ( + [val] => 9 + ) + + [0.5] => cr Object + ( + [val] => 12 + ) + + [0] => cr Object + ( + [val] => 23 + ) + +) \ No newline at end of file http://cvs.php.net/diff.php/pear/PHP_Compat/tests/function/array_uintersect_uassoc.phpt?r1=1.2&r2=1.3&ty=u Index: pear/PHP_Compat/tests/function/array_uintersect_uassoc.phpt diff -u pear/PHP_Compat/tests/function/array_uintersect_uassoc.phpt:1.2 pear/PHP_Compat/tests/function/array_uintersect_uassoc.phpt:1.3 --- pear/PHP_Compat/tests/function/array_uintersect_uassoc.phpt:1.2 Fri Aug 27 06:47:53 2004 +++ pear/PHP_Compat/tests/function/array_uintersect_uassoc.phpt Tue Aug 31 07:07:33 2004 @@ -10,10 +10,11 @@ $array1 = array('a' => 'green', 'b' => 'brown', 'c' => 'blue', 'red'); $array2 = array('a' => 'GREEN', 'B' => 'brown', 'yellow', 'red'); -print_r(array_uintersect_uassoc($array1, $array2, 'strcasecmp')); +print_r(array_uintersect_uassoc($array1, $array2, 'strcasecmp', 'strcasecmp')); ?> --EXPECT-- Array ( + [a] => green [b] => brown ) http://cvs.php.net/diff.php/pear/PHP_Compat/tests/function/get_include_path.phpt?r1=1.1&r2=1.2&ty=u Index: pear/PHP_Compat/tests/function/get_include_path.phpt diff -u pear/PHP_Compat/tests/function/get_include_path.phpt:1.1 pear/PHP_Compat/tests/function/get_include_path.phpt:1.2 --- pear/PHP_Compat/tests/function/get_include_path.phpt:1.1 Sat Aug 28 05:25:25 2004 +++ pear/PHP_Compat/tests/function/get_include_path.phpt Tue Aug 31 07:07:33 2004 @@ -7,5 +7,9 @@ require_once 'PHP/Compat.php'; PHP_Compat::loadFunction('get_include_path'); +if (get_include_path() == ini_get('include_path')) { + echo 'true'; +} ?> --EXPECT-- +true \ No newline at end of file http://cvs.php.net/diff.php/pear/PHP_Compat/tests/function/restore_include_path.phpt?r1=1.1&r2=1.2&ty=u Index: pear/PHP_Compat/tests/function/restore_include_path.phpt diff -u pear/PHP_Compat/tests/function/restore_include_path.phpt:1.1 pear/PHP_Compat/tests/function/restore_include_path.phpt:1.2 --- pear/PHP_Compat/tests/function/restore_include_path.phpt:1.1 Sat Aug 28 05:25:25 2004 +++ pear/PHP_Compat/tests/function/restore_include_path.phpt Tue Aug 31 07:07:33 2004 @@ -7,5 +7,17 @@ require_once 'PHP/Compat.php'; PHP_Compat::loadFunction('restore_include_path'); +$orig = ini_get('include_path'); +ini_set('include_path', 'foo'); +echo ini_get('include_path'), "\n"; + +restore_include_path(); +$new = ini_get('include_path'); + +if ($orig == $new) { + echo 'true'; +} ?> --EXPECT-- +foo +true \ No newline at end of file http://cvs.php.net/diff.php/pear/PHP_Compat/tests/function/set_include_path.phpt?r1=1.1&r2=1.2&ty=u Index: pear/PHP_Compat/tests/function/set_include_path.phpt diff -u pear/PHP_Compat/tests/function/set_include_path.phpt:1.1 pear/PHP_Compat/tests/function/set_include_path.phpt:1.2 --- pear/PHP_Compat/tests/function/set_include_path.phpt:1.1 Sat Aug 28 05:25:25 2004 +++ pear/PHP_Compat/tests/function/set_include_path.phpt Tue Aug 31 07:07:33 2004 @@ -7,5 +7,8 @@ require_once 'PHP/Compat.php'; PHP_Compat::loadFunction('set_include_path'); +set_include_path('foo'); +echo ini_get('include_path'); ?> --EXPECT-- +foo \ No newline at end of file

« previous php.pear.cvs (#23527) next »