@@ -599,13 +599,14 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
599
599
public function testReflectionClassWithAttribute ()
600
600
{
601
601
$ var = new \ReflectionClass (LotsOfAttributes::class);
602
+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
602
603
603
- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
604
+ $ this ->assertDumpMatchesFormat (<<<EOTXT
604
605
ReflectionClass {
605
606
+name: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
606
607
%A attributes: array:1 [
607
608
0 => ReflectionAttribute {
608
- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
609
+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
609
610
arguments: []
610
611
}
611
612
]
@@ -621,14 +622,15 @@ public function testReflectionClassWithAttribute()
621
622
public function testReflectionMethodWithAttribute ()
622
623
{
623
624
$ var = new \ReflectionMethod (LotsOfAttributes::class, 'someMethod ' );
625
+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
624
626
625
- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
627
+ $ this ->assertDumpMatchesFormat (<<<EOTXT
626
628
ReflectionMethod {
627
629
+name: "someMethod"
628
630
+class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
629
631
%A attributes: array:1 [
630
632
0 => ReflectionAttribute {
631
- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
633
+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
632
634
arguments: array:1 [
633
635
0 => "two"
634
636
]
@@ -646,14 +648,15 @@ public function testReflectionMethodWithAttribute()
646
648
public function testReflectionPropertyWithAttribute ()
647
649
{
648
650
$ var = new \ReflectionProperty (LotsOfAttributes::class, 'someProperty ' );
651
+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
649
652
650
- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
653
+ $ this ->assertDumpMatchesFormat (<<<EOTXT
651
654
ReflectionProperty {
652
655
+name: "someProperty"
653
656
+class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
654
657
%A attributes: array:1 [
655
658
0 => ReflectionAttribute {
656
- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
659
+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
657
660
arguments: array:2 [
658
661
0 => "one"
659
662
"extra" => "hello"
@@ -671,22 +674,23 @@ public function testReflectionPropertyWithAttribute()
671
674
public function testReflectionClassConstantWithAttribute ()
672
675
{
673
676
$ var = new \ReflectionClassConstant (LotsOfAttributes::class, 'SOME_CONSTANT ' );
677
+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
674
678
675
- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
679
+ $ this ->assertDumpMatchesFormat (<<<EOTXT
676
680
ReflectionClassConstant {
677
681
+name: "SOME_CONSTANT"
678
682
+class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
679
683
modifiers: "public"
680
684
value: "some value"
681
685
attributes: array:2 [
682
686
0 => ReflectionAttribute {
683
- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
687
+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
684
688
arguments: array:1 [
685
689
0 => "one"
686
690
]
687
691
}
688
692
1 => ReflectionAttribute {
689
- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
693
+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
690
694
arguments: array:1 [
691
695
0 => "two"
692
696
]
@@ -703,14 +707,15 @@ public function testReflectionClassConstantWithAttribute()
703
707
public function testReflectionParameterWithAttribute ()
704
708
{
705
709
$ var = new \ReflectionParameter ([LotsOfAttributes::class, 'someMethod ' ], 'someParameter ' );
710
+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
706
711
707
- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
712
+ $ this ->assertDumpMatchesFormat (<<<EOTXT
708
713
ReflectionParameter {
709
714
+name: "someParameter"
710
715
position: 0
711
716
attributes: array:1 [
712
717
0 => ReflectionAttribute {
713
- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
718
+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
714
719
arguments: array:1 [
715
720
0 => "three"
716
721
]
0 commit comments