lithium\test\Unit::assertClassNotHasAttribute PHP Метод

assertClassNotHasAttribute() публичный Метод

$this->assertClassNotHasAttribute('name', 'ReflectionClass'); // succeeds $this->assertClassNotHasAttribute('__construct', 'ReflectionClass'); // fails
См. также: lithium\test\Unit::assert()
См. также: lithium\test\Unit::assertObjectHasAttribute()
public assertClassNotHasAttribute ( mixed $attributeName, string $class, string | boolean $message = '{:message}' ) : boolean
$attributeName mixed
$class string
$message string | boolean
Результат boolean `true` if the assertion succeeded, `false` otherwise.
    public function assertClassNotHasAttribute($attributeName, $class, $message = '{:message}')
    {
        if (!is_string($class)) {
            throw new InvalidArgumentException('Argument $class must be a string.');
        }
        $object = new ReflectionClass($class);
        return $this->assert(!$object->hasProperty($attributeName), $message, array('expected' => $attributeName, 'result' => $object->getProperties()));
    }