assertClassNotHasAttribute() public static méthode

Asserts that a class does not have a specified attribute.
public static assertClassNotHasAttribute ( string $attributeName, string $className, string $message = '' )
$attributeName string
$className string
$message string
Exemple #1
0
/**
 * Asserts that a class does not have a specified attribute.
 *
 * @param  string $attributeName
 * @param  string $className
 * @param  string $message
 * @since  Method available since Release 3.1.0
 */
function assertClassNotHasAttribute($attributeName, $className, $message = '')
{
    return PHPUnit_Framework_Assert::assertClassNotHasAttribute($attributeName, $className, $message);
}
Exemple #2
0
 /**
  * Expect that a class or an object does not have a specified attribute.
  *
  * @param string $attributeName
  * @param string $message
  *
  * @return Expect
  */
 public function notToHaveAttribute($attributeName, $message = '')
 {
     if (is_string($this->value)) {
         // class
         Assert::assertClassNotHasAttribute($attributeName, $this->value, $message);
     } else {
         // object
         Assert::assertObjectNotHasAttribute($attributeName, $this->value, $message);
     }
     return $this;
 }
Exemple #3
0
 public function notHasAttribute($attribute)
 {
     if (is_string($attribute)) {
         a::assertClassNotHasAttribute($attribute, $this->actual, $this->description);
     } else {
         a::assertObjectNotHasAttribute($attribute, $this->actual, $this->description);
     }
 }
Exemple #4
0
 public function doesNotHaveAttribute($attribute)
 {
     Assert::assertClassNotHasAttribute($attribute, $this->actual, $this->description);
     return $this;
 }