Skip to content

Commit ae38df3

Browse files
committed
Add test for a property having multiple attributes
1 parent 71b6b77 commit ae38df3

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

Zend/zend_exceptions_arginfo.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/zend_test/test.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ trait _ZendTestTrait {
5454

5555
/** @var mixed */
5656
#[ZendTestAttribute]
57+
#[ZendTestPropertyAttribute("testProp")]
5758
public $testProp;
5859

5960
#[ZendTestAttribute]

ext/zend_test/test_arginfo.h

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/zend_test/tests/gen_stub_test_02.phpt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ var_dump($reflectionConstant->getAttributes()[0]->newInstance());
1414

1515
$reflectionProperty = new ReflectionProperty(Foo::class, "testProp");
1616
var_dump($reflectionProperty->getAttributes()[0]->newInstance());
17+
var_dump($reflectionProperty->getAttributes()[1]->newInstance());
1718

1819
$reflectionMethod = new ReflectionMethod(Foo::class, "testMethod");
1920
var_dump($reflectionMethod->getAttributes()[0]->newInstance());
2021

2122
?>
2223
--EXPECTF--
23-
object(ZendTestAttribute)#%d (0) {
24+
object(ZendTestAttribute)#%d (%d) {
2425
}
25-
object(ZendTestAttribute)#%d (0) {
26+
object(ZendTestAttribute)#%d (%d) {
2627
}
27-
object(ZendTestAttribute)#%d (0) {
28+
object(ZendTestPropertyAttribute)#%d (%d) {
29+
["parameter"]=>
30+
string(%d) "testProp"
31+
}
32+
object(ZendTestAttribute)#%d (%d) {
2833
}

0 commit comments

Comments
 (0)