[PHP-CVS] cvs: php-src /ext/spl/tests array_001.phpt

2008-10-17 Thread Zoe Slattery
zoe Fri Oct 17 15:05:31 2008 UTC

  Modified files:  
/php-src/ext/spl/tests  array_001.phpt 
  Log:
  Replacing explicit object ID with %d
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/array_001.phpt?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/spl/tests/array_001.phpt
diff -u php-src/ext/spl/tests/array_001.phpt:1.6 
php-src/ext/spl/tests/array_001.phpt:1.7
--- php-src/ext/spl/tests/array_001.phpt:1.6Tue May 27 02:55:50 2008
+++ php-src/ext/spl/tests/array_001.phptFri Oct 17 15:05:31 2008
@@ -36,7 +36,7 @@
 ===DONE===
 
 --EXPECTF--
-object(ArrayObject)#1 (1) {
+object(ArrayObject)#%d (1) {
   [u"storage":u"ArrayObject":private]=>
   array(2) {
 [0]=>
@@ -62,7 +62,7 @@
   int(5)
 }
 unicode(1) "a"
-object(ArrayObject)#1 (1) {
+object(ArrayObject)#%d (1) {
   [u"storage":u"ArrayObject":private]=>
   array(5) {
 [0]=>
@@ -88,7 +88,7 @@
 Notice: Undefined offset:  7 in %sarray_001.php on line %d
 
 Notice: Undefined index:  c in %sarray_001.php on line %d
-object(ArrayObject)#1 (1) {
+object(ArrayObject)#%d (1) {
   [u"storage":u"ArrayObject":private]=>
   array(2) {
 [0]=>
@@ -97,7 +97,7 @@
 int(2)
   }
 }
-object(ArrayObject)#1 (1) {
+object(ArrayObject)#%d (1) {
   [u"storage":u"ArrayObject":private]=>
   array(4) {
 [0]=>



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



[PHP-CVS] cvs: php-src /ext/spl/tests array_001.phpt array_004.phpt

2004-04-13 Thread Marcus Boerger
helly   Tue Apr 13 15:08:54 2004 EDT

  Modified files:  
/php-src/ext/spl/tests  array_001.phpt array_004.phpt 
  Log:
  Update error messages in tests
  
http://cvs.php.net/diff.php/php-src/ext/spl/tests/array_001.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/spl/tests/array_001.phpt
diff -u php-src/ext/spl/tests/array_001.phpt:1.1 
php-src/ext/spl/tests/array_001.phpt:1.2
--- php-src/ext/spl/tests/array_001.phpt:1.1Tue Apr 13 15:06:39 2004
+++ php-src/ext/spl/tests/array_001.phptTue Apr 13 15:08:54 2004
@@ -75,15 +75,15 @@
 }
 int(0)
 
-Notice: Undefined offset:  6 in %sarray_object.php on line %d
+Notice: Undefined offset:  6 in %sarray_001.php on line %d
 NULL
 
-Notice: Undefined index:  b in %sarray_object.php on line %d
+Notice: Undefined index:  b in %sarray_001.php on line %d
 NULL
 
-Notice: Undefined offset:  7 in %sarray_object.php on line %d
+Notice: Undefined offset:  7 in %sarray_001.php on line %d
 
-Notice: Undefined index:  c in %sarray_object.php on line %d
+Notice: Undefined index:  c in %sarray_001.php on line %d
 object(ArrayObject)#1 (2) {
   [0]=>
   int(0)
http://cvs.php.net/diff.php/php-src/ext/spl/tests/array_004.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/spl/tests/array_004.phpt
diff -u php-src/ext/spl/tests/array_004.phpt:1.1 
php-src/ext/spl/tests/array_004.phpt:1.2
--- php-src/ext/spl/tests/array_004.phpt:1.1Tue Apr 13 15:06:39 2004
+++ php-src/ext/spl/tests/array_004.phptTue Apr 13 15:08:54 2004
@@ -117,11 +117,11 @@
 1=>1 - 0=>0
 1=>1 - 1=>1
 
-Notice: ArrayIterator::next(): Array was modified outside object and internal 
position is no longer valid in %sarray_iterator.php on line %d
+Notice: ArrayIterator::next(): Array was modified outside object and internal 
position is no longer valid in %sarray_004.php on line %d
 1=>1 - 0=>0
 1=>1 - 2=>2
 
-Notice: ArrayIterator::next(): Array was modified outside object and internal 
position is no longer valid in %sarray_iterator.php on line %d
+Notice: ArrayIterator::next(): Array was modified outside object and internal 
position is no longer valid in %sarray_004.php on line %d
 0=>0 - 0=>0
 0=>0 - 2=>2
 2=>2 - 0=>0
@@ -133,11 +133,11 @@
 1=>1 - 0=>0
 1=>1 - 1=>1
 
-Notice: ArrayIterator::next(): Array was modified outside object and is no longer an 
array in %sarray_iterator.php on line %d
+Notice: ArrayIterator::next(): Array was modified outside object and is no longer an 
array in %sarray_004.php on line %d
 
-Notice: ArrayIterator::valid(): Array was modified outside object and is no longer an 
array in %sarray_iterator.php on line %d
+Notice: ArrayIterator::valid(): Array was modified outside object and is no longer an 
array in %sarray_004.php on line %d
 
-Notice: ArrayIterator::next(): Array was modified outside object and is no longer an 
array in %sarray_iterator.php on line %d
+Notice: ArrayIterator::next(): Array was modified outside object and is no longer an 
array in %sarray_004.php on line %d
 
-Notice: ArrayIterator::valid(): Array was modified outside object and is no longer an 
array in %sarray_iterator.php on line %d
+Notice: ArrayIterator::valid(): Array was modified outside object and is no longer an 
array in %sarray_004.php on line %d
 Done

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



[PHP-CVS] cvs: php-src /ext/spl/tests array_001.phpt array_002.phpt array_003.phpt array_004.phpt array_005.phpt array_iterator.phpt array_object.phpt array_object_iterator.phpt

2004-04-13 Thread Marcus Boerger
helly   Tue Apr 13 15:06:39 2004 EDT

  Added files: 
/php-src/ext/spl/tests  array_001.phpt array_002.phpt array_003.phpt 
array_004.phpt array_005.phpt 

  Removed files:   
/php-src/ext/spl/tests  array_iterator.phpt array_object.phpt 
array_object_iterator.phpt 
  Log:
  New tests (and ordering of tests)
  

http://cvs.php.net/co.php/php-src/ext/spl/tests/array_001.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/array_001.phpt
+++ php-src/ext/spl/tests/array_001.phpt
--TEST--
SPL: ArrayObject
--SKIPIF--

--FILE--
0, 1=>1);
$ar = new ArrayObject($ar);

var_dump($ar);

$ar[2] = 2;
var_dump($ar[2]);
var_dump($ar["3"] = 3);

var_dump(array_merge((array)$ar, array(4=>4, 5=>5)));

var_dump($ar["a"] = "a");

var_dump($ar);
var_dump($ar[0]);
var_dump($ar[6]);
var_dump($ar["b"]);

unset($ar[1]);
unset($ar["3"]);
unset($ar["a"]);
unset($ar[7]);
unset($ar["c"]);
var_dump($ar);

$ar[] = '3';
$ar[] = 4;
var_dump($ar);

?>
===DONE===

--EXPECTF--
object(ArrayObject)#1 (2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
int(2)
int(3)
array(6) {
  [0]=>
  int(0)
  [1]=>
  int(1)
  [2]=>
  int(2)
  [3]=>
  int(3)
  [4]=>
  int(4)
  [5]=>
  int(5)
}
string(1) "a"
object(ArrayObject)#1 (5) {
  [0]=>
  int(0)
  [1]=>
  int(1)
  [2]=>
  int(2)
  [3]=>
  int(3)
  ["a"]=>
  string(1) "a"
}
int(0)

Notice: Undefined offset:  6 in %sarray_object.php on line %d
NULL

Notice: Undefined index:  b in %sarray_object.php on line %d
NULL

Notice: Undefined offset:  7 in %sarray_object.php on line %d

Notice: Undefined index:  c in %sarray_object.php on line %d
object(ArrayObject)#1 (2) {
  [0]=>
  int(0)
  [2]=>
  int(2)
}
object(ArrayObject)#1 (4) {
  [0]=>
  int(0)
  [2]=>
  int(2)
  [4]=>
  string(1) "3"
  [5]=>
  int(4)
}
===DONE===

http://cvs.php.net/co.php/php-src/ext/spl/tests/array_002.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/array_002.phpt
+++ php-src/ext/spl/tests/array_002.phpt
--TEST--
SPL: ArrayObject copy constructor
--SKIPIF--

--FILE--
 'one',
   '2' => 'two',
   '3' => 'three');

$object = new ArrayObject($array);
$object[] = 'four';

$arrayObject = new ArrayObject($object);

$arrayObject[] = 'five';

var_dump($arrayObject);

?>
===DONE===

--EXPECTF--
object(ArrayObject)#%d (5) {
  [1]=>
  string(3) "one"
  [2]=>
  string(3) "two"
  [3]=>
  string(5) "three"
  [4]=>
  string(4) "four"
  [5]=>
  string(4) "five"
}
===DONE===

http://cvs.php.net/co.php/php-src/ext/spl/tests/array_003.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/array_003.phpt
+++ php-src/ext/spl/tests/array_003.phpt
--TEST--
SPL: ArrayObject from object
--SKIPIF--

--FILE--
imp = "implicit";
}
};

$test = new test;
$test->dyn = "dynamic";

print_r($test);

$object = new ArrayObject($test);

print_r($object);

?>
===DONE===

--EXPECTF--
test Object
(
[pub] => public
[pro:protected] => protected
[pri:private] => private
[imp] => implicit
[dyn] => dynamic
)
ArrayObject Object
(
[pub] => public
[pro:protected] => protected
[pri:private] => private
[imp] => implicit
[dyn] => dynamic
)
===DONE===

http://cvs.php.net/co.php/php-src/ext/spl/tests/array_004.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/array_004.phpt
+++ php-src/ext/spl/tests/array_004.phpt
--TEST--
SPL: ArrayIterator
--SKIPIF--

--INI--
allow_call_time_pass_reference=1
--FILE--
0, 1=>1, 2=>2);
$obj = new ArrayObject($arr);

foreach($obj as $ak=>$av) {
foreach($obj as $bk=>$bv) {
if ($ak==0 && $bk==0) {
$arr[0] = "modify";
}
echo "$ak=>$av - $bk=>$bv\n";
}
}

echo "==UseRef==\n";

$arr = array(0=>0, 1=>1, 2=>2);
$obj = new ArrayObject(&$arr);

foreach($obj as $ak=>$av) {
foreach($obj as $bk=>$bv) {
if ($ak==0 && $bk==0) {
$arr[0] = "modify";
}
echo "$ak=>$av - $bk=>$bv\n";
}
}

echo "==Modify==\n";

$arr = array(0=>0, 1=>1, 2=>2);
$obj = new ArrayObject(&$arr);

foreach($obj as $ak=>$av) {
foreach($obj as $bk=>$bv) {
if ($ak==0 && $bk==0) {
$arr[0] = "modify";
}
echo "$ak=>$av - $bk=>$bv\n";
}
}

echo "==Delete==\n";

$arr = array(0=>0, 1=>1, 2=>2);
$obj = new ArrayObject(&$arr);

foreach($obj as $ak=>$av) {
foreach($obj as $bk=>$bv) {
if ($ak==1 && $bk==1) {
unset($arr[1]);
}
echo "$ak=>$av - $bk=>$bv\n";
}
}

echo "==Change==\n";

$arr = array(0=>0, 1=>1, 2=>2);
$obj = new ArrayObject(&$arr);

foreach($obj as $ak=>$av) {
foreach($obj as $bk=>$bv) {
if ($ak==1 && $bk==1) {
$arr = NULL;
}
echo "$ak=>$av - $bk=>$bv\n";
}
}

echo "Done\n";
?>
--EXPECTF--
==Normal==
0=>0 - 0=>0
0=>0 - 1=>1
0=>