@@ -18,20 +18,21 @@ public function testGetAttributesInsideAttributeTags(): void
1818 $ attributes = AttributeHelper::getAttributes ($ phpcsFile , $ firstAttributePointer );
1919
2020 $ expected = [
21- 4 => ['Attribute1 ' , null ],
22- 7 => ['\\FQN \\Attribute2 ' , "('var') " ],
23- 17 => ['Attribute3 ' , "(option: PDO::class, option2: true, option3: 'False') " ],
24- 39 => ['\\Attribute4 ' , '() ' ],
25- 44 => ['Attribute5 ' , null ],
21+ ['Attribute1 ' , '\\Attribute1 ' , null ],
22+ ['\\FQN \\Attribute2 ' , '\\FQN \\Attribute2 ' , "('var') " ],
23+ ['Attribute3 ' , '\\Attribute3 ' , "(option: PDO::class, option2: true, option3: 'False') " ],
24+ ['\\Attribute4 ' , '\\Attribute4 ' , '() ' ],
25+ ['Attribute5 ' , '\\Attribute5 ' , null ],
26+ ['Attribute6 ' , '\\FQN \\Attribute6 ' , null ],
2627 ];
2728
2829 self ::assertCount (count ($ expected ), $ attributes );
2930
30- foreach ($ attributes as $ attribute ) {
31- self ::assertSame (3 , $ attribute ->getAttributePointer ());
32- self ::assertArrayHasKey ( $ attribute ->getStartPointer (), $ expected );
33- self ::assertSame ($ expected [$ attribute -> getStartPointer ()][ 0 ], $ attribute ->getName ());
34- self ::assertSame ($ expected [$ attribute -> getStartPointer ()][ 1 ], $ attribute ->getContent ());
31+ foreach ($ attributes as $ attributeNo => $ attribute ) {
32+ self ::assertSame (11 , $ attribute ->getAttributePointer ());
33+ self ::assertSame ( $ expected [ $ attributeNo ][ 0 ], $ attribute ->getName () );
34+ self ::assertSame ($ expected [$ attributeNo ][ 1 ], $ attribute ->getFullyQualifiedName ());
35+ self ::assertSame ($ expected [$ attributeNo ][ 2 ], $ attribute ->getContent ());
3536 }
3637 }
3738
0 commit comments