/**
* @covers PHPUnit_Framework_Constraint_ClassHasAttribute
* @covers PHPUnit_Framework_Constraint_Not
* @covers PHPUnit_Framework_Assert::classHasAttribute
* @covers PHPUnit_Framework_Assert::logicalNot
*/
public function testConstraintClassNotHasAttribute2()
{
$constraint = PHPUnit_Framework_Assert::logicalNot(PHPUnit_Framework_Assert::classHasAttribute('notExistingAttribute'));
try {
$constraint->fail('ClassWithNonPublicAttributes', 'custom message', TRUE);
} catch (PHPUnit_Framework_ExpectationFailedException $e) {
$this->assertEquals("custom message\nFailed asserting that class \"ClassWithNonPublicAttributes\" does not have attribute \"notExistingAttribute\".", $e->getDescription());
return;
}
$this->fail();
}