/** * Asserts that a class has a specified attribute. * * @param string $attributeName * @param string $className * @param string $message * @since Method available since Release 3.1.0 */ function assertClassHasAttribute($attributeName, $className, $message = '') { return PHPUnit_Framework_Assert::assertClassHasAttribute($attributeName, $className, $message); }
public function hasAttribute($attribute) { if (is_string($attribute)) { a::assertClassHasAttribute($attribute, $this->actual, $this->description); } else { a::assertObjectHasAttribute($attribute, $this->actual, $this->description); } }
/** * Expect that a class or an object has a specified attribute. * * @param string $attributeName * @param string $message * * @return Expect */ public function toHaveAttribute($attributeName, $message = '') { if (is_string($this->value)) { // class Assert::assertClassHasAttribute($attributeName, $this->value, $message); } else { // object Assert::assertObjectHasAttribute($attributeName, $this->value, $message); } return $this; }
public function hasAttribute($attribute) { Assert::assertClassHasAttribute($attribute, $this->actual, $this->description); return $this; }
public function classToHaveAttribute($attributeName) { \PHPUnit_Framework_Assert::assertClassHasAttribute($attributeName, $this->actual); }
public function shouldHaveAttribute($key) { Assert::assertClassHasAttribute($key, $this->it); }