@@ -143,7 +143,7 @@ public static function assertContains($needle, $haystack, $message = '', $ignore
143
143
144
144
else {
145
145
throw PHPUnit_Util_InvalidArgumentHelper::factory (
146
- 2 , 'array, iterator or string '
146
+ 2 , 'array, traversable or string '
147
147
);
148
148
}
149
149
@@ -207,7 +207,7 @@ public static function assertNotContains($needle, $haystack, $message = '', $ign
207
207
208
208
else {
209
209
throw PHPUnit_Util_InvalidArgumentHelper::factory (
210
- 2 , 'array, iterator or string '
210
+ 2 , 'array, traversable or string '
211
211
);
212
212
}
213
213
@@ -253,7 +253,7 @@ public static function assertContainsOnly($type, $haystack, $isNativeType = NULL
253
253
if (!(is_array ($ haystack ) ||
254
254
is_object ($ haystack ) && $ haystack instanceof Traversable)) {
255
255
throw PHPUnit_Util_InvalidArgumentHelper::factory (
256
- 2 , 'array or iterator '
256
+ 2 , 'array or traversable '
257
257
);
258
258
}
259
259
@@ -282,7 +282,7 @@ public static function assertContainsOnlyInstancesOf($classname, $haystack, $mes
282
282
if (!(is_array ($ haystack ) ||
283
283
is_object ($ haystack ) && $ haystack instanceof Traversable)) {
284
284
throw PHPUnit_Util_InvalidArgumentHelper::factory (
285
- 2 , 'array or iterator '
285
+ 2 , 'array or traversable '
286
286
);
287
287
}
288
288
@@ -330,7 +330,7 @@ public static function assertNotContainsOnly($type, $haystack, $isNativeType = N
330
330
if (!(is_array ($ haystack ) ||
331
331
is_object ($ haystack ) && $ haystack instanceof Traversable)) {
332
332
throw PHPUnit_Util_InvalidArgumentHelper::factory (
333
- 2 , 'array or iterator '
333
+ 2 , 'array or traversable '
334
334
);
335
335
}
336
336
@@ -372,7 +372,7 @@ public static function assertAttributeNotContainsOnly($type, $haystackAttributeN
372
372
}
373
373
374
374
/**
375
- * Asserts the number of elements of an array, Countable or Iterator .
375
+ * Asserts the number of elements of an array, Countable or Traversable .
376
376
*
377
377
* @param integer $expectedCount
378
378
* @param mixed $haystack
@@ -385,9 +385,9 @@ public static function assertCount($expectedCount, $haystack, $message = '')
385
385
}
386
386
387
387
if (!$ haystack instanceof Countable &&
388
- !$ haystack instanceof Iterator &&
388
+ !$ haystack instanceof Traversable &&
389
389
!is_array ($ haystack )) {
390
- throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable ' );
390
+ throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable or traversable ' );
391
391
}
392
392
393
393
self ::assertThat (
@@ -398,7 +398,7 @@ public static function assertCount($expectedCount, $haystack, $message = '')
398
398
}
399
399
400
400
/**
401
- * Asserts the number of elements of an array, Countable or Iterator
401
+ * Asserts the number of elements of an array, Countable or Traversable
402
402
* that is stored in an attribute.
403
403
*
404
404
* @param integer $expectedCount
@@ -417,7 +417,7 @@ public static function assertAttributeCount($expectedCount, $haystackAttributeNa
417
417
}
418
418
419
419
/**
420
- * Asserts the number of elements of an array, Countable or Iterator .
420
+ * Asserts the number of elements of an array, Countable or Traversable .
421
421
*
422
422
* @param integer $expectedCount
423
423
* @param mixed $haystack
@@ -430,9 +430,9 @@ public static function assertNotCount($expectedCount, $haystack, $message = '')
430
430
}
431
431
432
432
if (!$ haystack instanceof Countable &&
433
- !$ haystack instanceof Iterator &&
433
+ !$ haystack instanceof Traversable &&
434
434
!is_array ($ haystack )) {
435
- throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable ' );
435
+ throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable or traversable ' );
436
436
}
437
437
438
438
$ constraint = new PHPUnit_Framework_Constraint_Not (
@@ -443,7 +443,7 @@ public static function assertNotCount($expectedCount, $haystack, $message = '')
443
443
}
444
444
445
445
/**
446
- * Asserts the number of elements of an array, Countable or Iterator
446
+ * Asserts the number of elements of an array, Countable or Traversable
447
447
* that is stored in an attribute.
448
448
*
449
449
* @param integer $expectedCount
@@ -941,7 +941,7 @@ public static function assertClassHasAttribute($attributeName, $className, $mess
941
941
if (!is_string ($ attributeName )) {
942
942
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'string ' );
943
943
}
944
-
944
+
945
945
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
946
946
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'valid attribute name ' );
947
947
}
@@ -970,7 +970,7 @@ public static function assertClassNotHasAttribute($attributeName, $className, $m
970
970
if (!is_string ($ attributeName )) {
971
971
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'string ' );
972
972
}
973
-
973
+
974
974
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
975
975
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'valid attribute name ' );
976
976
}
@@ -999,7 +999,7 @@ public static function assertClassHasStaticAttribute($attributeName, $className,
999
999
if (!is_string ($ attributeName )) {
1000
1000
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'string ' );
1001
1001
}
1002
-
1002
+
1003
1003
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
1004
1004
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'valid attribute name ' );
1005
1005
}
@@ -1028,7 +1028,7 @@ public static function assertClassNotHasStaticAttribute($attributeName, $classNa
1028
1028
if (!is_string ($ attributeName )) {
1029
1029
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'string ' );
1030
1030
}
1031
-
1031
+
1032
1032
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
1033
1033
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'valid attribute name ' );
1034
1034
}
@@ -1059,7 +1059,7 @@ public static function assertObjectHasAttribute($attributeName, $object, $messag
1059
1059
if (!is_string ($ attributeName )) {
1060
1060
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'string ' );
1061
1061
}
1062
-
1062
+
1063
1063
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
1064
1064
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'valid attribute name ' );
1065
1065
}
@@ -1088,7 +1088,7 @@ public static function assertObjectNotHasAttribute($attributeName, $object, $mes
1088
1088
if (!is_string ($ attributeName )) {
1089
1089
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'string ' );
1090
1090
}
1091
-
1091
+
1092
1092
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
1093
1093
throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'valid attribute name ' );
1094
1094
}
@@ -1404,25 +1404,25 @@ public static function assertNotRegExp($pattern, $string, $message = '')
1404
1404
}
1405
1405
1406
1406
/**
1407
- * Assert that the size of two arrays (or `Countable` or `Iterator ` objects)
1407
+ * Assert that the size of two arrays (or `Countable` or `Traversable ` objects)
1408
1408
* is the same.
1409
1409
*
1410
- * @param array|Countable|Iterator $expected
1411
- * @param array|Countable|Iterator $actual
1410
+ * @param array|Countable|Traversable $expected
1411
+ * @param array|Countable|Traversable $actual
1412
1412
* @param string $message
1413
1413
*/
1414
1414
public static function assertSameSize ($ expected , $ actual , $ message = '' )
1415
1415
{
1416
1416
if (!$ expected instanceof Countable &&
1417
- !$ expected instanceof Iterator &&
1417
+ !$ expected instanceof Traversable &&
1418
1418
!is_array ($ expected )) {
1419
- throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'countable ' );
1419
+ throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'countable or traversable ' );
1420
1420
}
1421
1421
1422
1422
if (!$ actual instanceof Countable &&
1423
- !$ actual instanceof Iterator &&
1423
+ !$ actual instanceof Traversable &&
1424
1424
!is_array ($ actual )) {
1425
- throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable ' );
1425
+ throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable or traversable ' );
1426
1426
}
1427
1427
1428
1428
self ::assertThat (
@@ -1433,25 +1433,25 @@ public static function assertSameSize($expected, $actual, $message = '')
1433
1433
}
1434
1434
1435
1435
/**
1436
- * Assert that the size of two arrays (or `Countable` or `Iterator ` objects)
1436
+ * Assert that the size of two arrays (or `Countable` or `Traversable ` objects)
1437
1437
* is not the same.
1438
1438
*
1439
- * @param array|Countable|Iterator $expected
1440
- * @param array|Countable|Iterator $actual
1439
+ * @param array|Countable|Traversable $expected
1440
+ * @param array|Countable|Traversable $actual
1441
1441
* @param string $message
1442
1442
*/
1443
1443
public static function assertNotSameSize ($ expected , $ actual , $ message = '' )
1444
1444
{
1445
1445
if (!$ expected instanceof Countable &&
1446
- !$ expected instanceof Iterator &&
1446
+ !$ expected instanceof Traversable &&
1447
1447
!is_array ($ expected )) {
1448
- throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'countable ' );
1448
+ throw PHPUnit_Util_InvalidArgumentHelper::factory (1 , 'countable or traversable ' );
1449
1449
}
1450
1450
1451
1451
if (!$ actual instanceof Countable &&
1452
- !$ actual instanceof Iterator &&
1452
+ !$ actual instanceof Traversable &&
1453
1453
!is_array ($ actual )) {
1454
- throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable ' );
1454
+ throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'countable or traversable ' );
1455
1455
}
1456
1456
1457
1457
$ constraint = new PHPUnit_Framework_Constraint_Not (
@@ -2810,7 +2810,7 @@ public static function readAttribute($classOrObject, $attributeName)
2810
2810
if (!is_string ($ attributeName )) {
2811
2811
throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'string ' );
2812
2812
}
2813
-
2813
+
2814
2814
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
2815
2815
throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'valid attribute name ' );
2816
2816
}
@@ -2910,7 +2910,7 @@ protected static function getStaticAttribute($className, $attributeName)
2910
2910
if (!is_string ($ attributeName )) {
2911
2911
throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'string ' );
2912
2912
}
2913
-
2913
+
2914
2914
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
2915
2915
throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'valid attribute name ' );
2916
2916
}
@@ -2955,7 +2955,7 @@ protected static function getObjectAttribute($object, $attributeName)
2955
2955
if (!is_string ($ attributeName )) {
2956
2956
throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'string ' );
2957
2957
}
2958
-
2958
+
2959
2959
if (!preg_match ('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ ' , $ attributeName )) {
2960
2960
throw PHPUnit_Util_InvalidArgumentHelper::factory (2 , 'valid attribute name ' );
2961
2961
}
0 commit comments