Skip to content

Commit 96ab3b6

Browse files
committed
Fix attribtue tests for new syntax
1 parent e054836 commit 96ab3b6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Zend/tests/named_params/attributes.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Named params in attributes
33
--FILE--
44
<?php
55

6-
<<Attribute>>
6+
@@Attribute
77
class MyAttribute {
88
public function __construct(
99
public $a = 'a',
@@ -12,10 +12,10 @@ class MyAttribute {
1212
) {}
1313
}
1414

15-
<<MyAttribute('A', c: 'C')>>
15+
@@MyAttribute('A', c: 'C')
1616
class Test1 {}
1717

18-
<<MyAttribute('A', a: 'C')>>
18+
@@MyAttribute('A', a: 'C')
1919
class Test2 {}
2020

2121
$attr = (new ReflectionClass(Test1::class))->getAttributes()[0];

Zend/tests/named_params/attributes_duplicate_named_param.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Named params in attributes: Duplicate named parameter error
33
--FILE--
44
<?php
55

6-
<<MyAttribute(a: 'A', a: 'A')>>
6+
@@MyAttribute(a: 'A', a: 'A')
77
class Test {}
88

99
?>

Zend/tests/named_params/attributes_named_flags.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Named flags parameter for Attribute attribute
33
--FILE--
44
<?php
55

6-
<<Attribute(flags: Attribute::TARGET_CLASS)>>
6+
@@Attribute(flags: Attribute::TARGET_CLASS)
77
class MyAttribute {
88
}
99

10-
<<MyAttribute>>
10+
@@MyAttribute
1111
function test() {}
1212

1313
(new ReflectionFunction('test'))->getAttributes()[0]->newInstance();

Zend/tests/named_params/attributes_named_flags_incorrect.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Named flags parameter for Attribute attribute (incorrect parameter name)
44
<?php
55

66
// TODO: This should error at compile-time.
7-
<<Attribute(not_flags: Attribute::TARGET_CLASS)>>
7+
@@Attribute(not_flags: Attribute::TARGET_CLASS)
88
class MyAttribute {
99
}
1010

11-
<<MyAttribute>>
11+
@@MyAttribute
1212
function test() {}
1313

1414
(new ReflectionFunction('test'))->getAttributes()[0]->newInstance();

Zend/tests/named_params/attributes_positional_after_named.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Named params in attributes: Positional after named error
33
--FILE--
44
<?php
55

6-
<<Attribute>>
6+
@@Attribute
77
class MyAttribute { }
88

9-
<<MyAttribute(a: 'A', 'B')>>
9+
@@MyAttribute(a: 'A', 'B')
1010
class Test {}
1111

1212
?>

0 commit comments

Comments
 (0)