Skip to content
This repository
Browse code

Fixing a typo when reporting invalid attribute name

  • Loading branch information...
commit 0ad7c414e63c8689b151e6166b332a600e11dc2f 1 parent 8d44664
Agop Seropyan destructivecreator authored

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. +9 9 PHPUnit/Framework/Assert.php
18 PHPUnit/Framework/Assert.php
@@ -937,7 +937,7 @@ public static function assertClassHasAttribute($attributeName, $className, $mess
937 937 }
938 938
939 939 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
940   - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
  940 + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
941 941 }
942 942
943 943 if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -966,7 +966,7 @@ public static function assertClassNotHasAttribute($attributeName, $className, $m
966 966 }
967 967
968 968 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
969   - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
  969 + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
970 970 }
971 971
972 972 if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -995,7 +995,7 @@ public static function assertClassHasStaticAttribute($attributeName, $className,
995 995 }
996 996
997 997 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
998   - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
  998 + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
999 999 }
1000 1000
1001 1001 if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -1024,7 +1024,7 @@ public static function assertClassNotHasStaticAttribute($attributeName, $classNa
1024 1024 }
1025 1025
1026 1026 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
1027   - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
  1027 + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
1028 1028 }
1029 1029
1030 1030 if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -1055,7 +1055,7 @@ public static function assertObjectHasAttribute($attributeName, $object, $messag
1055 1055 }
1056 1056
1057 1057 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
1058   - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
  1058 + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
1059 1059 }
1060 1060
1061 1061 if (!is_object($object)) {
@@ -1084,7 +1084,7 @@ public static function assertObjectNotHasAttribute($attributeName, $object, $mes
1084 1084 }
1085 1085
1086 1086 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
1087   - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
  1087 + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
1088 1088 }
1089 1089
1090 1090 if (!is_object($object)) {
@@ -2784,7 +2784,7 @@ public static function readAttribute($classOrObject, $attributeName)
2784 2784 }
2785 2785
2786 2786 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
2787   - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'a valid name of attribute');
  2787 + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid name of attribute');
2788 2788 }
2789 2789
2790 2790 if (is_string($classOrObject)) {
@@ -2884,7 +2884,7 @@ protected static function getStaticAttribute($className, $attributeName)
2884 2884 }
2885 2885
2886 2886 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
2887   - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'a valid name of attribute');
  2887 + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid name of attribute');
2888 2888 }
2889 2889
2890 2890 $class = new ReflectionClass($className);
@@ -2929,7 +2929,7 @@ protected static function getObjectAttribute($object, $attributeName)
2929 2929 }
2930 2930
2931 2931 if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
2932   - throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'a valid name of attribute');
  2932 + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid name of attribute');
2933 2933 }
2934 2934
2935 2935 try {

0 comments on commit 0ad7c41

Please sign in to comment.
Something went wrong with that request. Please try again.