Permalink
Browse files

Fixing a typo when reporting invalid attribute name

  • Loading branch information...
1 parent 8d44664 commit 0ad7c414e63c8689b151e6166b332a600e11dc2f @destructivecreator destructivecreator committed Mar 13, 2013
Showing with 9 additions and 9 deletions.
  1. +9 −9 PHPUnit/Framework/Assert.php
@@ -937,7 +937,7 @@ public static function assertClassHasAttribute($attributeName, $className, $mess
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
}
if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -966,7 +966,7 @@ public static function assertClassNotHasAttribute($attributeName, $className, $m
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
}
if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -995,7 +995,7 @@ public static function assertClassHasStaticAttribute($attributeName, $className,
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
}
if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -1024,7 +1024,7 @@ public static function assertClassNotHasStaticAttribute($attributeName, $classNa
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
}
if (!is_string($className) || !class_exists($className, FALSE)) {
@@ -1055,7 +1055,7 @@ public static function assertObjectHasAttribute($attributeName, $object, $messag
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
}
if (!is_object($object)) {
@@ -1084,7 +1084,7 @@ public static function assertObjectNotHasAttribute($attributeName, $object, $mes
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid name of attribute');
}
if (!is_object($object)) {
@@ -2784,7 +2784,7 @@ public static function readAttribute($classOrObject, $attributeName)
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid name of attribute');
}
if (is_string($classOrObject)) {
@@ -2884,7 +2884,7 @@ protected static function getStaticAttribute($className, $attributeName)
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid name of attribute');
}
$class = new ReflectionClass($className);
@@ -2929,7 +2929,7 @@ protected static function getObjectAttribute($object, $attributeName)
}
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
- throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'a valid name of attribute');
+ throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'valid name of attribute');
}
try {

0 comments on commit 0ad7c41

Please sign in to comment.