summaryrefslogtreecommitdiff
path: root/Zend/tests/attributes/007_self_reflect_attribute.phpt
blob: b95542f87eb58e80149671466767a19345de2aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Attributes: attributes on Attribute return itself
--FILE--
<?php

$reflection = new \ReflectionClass(Attribute::class);
$attributes = $reflection->getAttributes();

foreach ($attributes as $attribute) {
    var_dump($attribute->getName());
    var_dump($attribute->getArguments());

    $a = $attribute->newInstance();
    var_dump(get_class($a));
    var_dump($a->flags == Attribute::TARGET_ALL);
}
?>
--EXPECT--
string(9) "Attribute"
array(0) {
}
string(9) "Attribute"
bool(true)