Skip to content

Commit 0e1eb6f

Browse files
committed
GetMethodParametersTest: add some missing array indexes expectations
This commit: 1. Fixes the order of a few array entries. 2. Adds some array entries which were supposed to be expected, but missing. The use of `assertArraySubset()` hid the fact that these entries were missing. As that assertion now needs to be replaced, these issues came to light.
1 parent bafca7e commit 0e1eb6f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/Core/File/GetMethodParametersTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ public function testSingleDefaultValue()
9595
$expected[0] = [
9696
'name' => '$var1',
9797
'content' => '$var1=self::CONSTANT',
98-
'has_attributes' => false,
9998
'default' => 'self::CONSTANT',
99+
'has_attributes' => false,
100100
'pass_by_reference' => false,
101101
'variable_length' => false,
102102
'type_hint' => '',
@@ -119,8 +119,8 @@ public function testDefaultValues()
119119
$expected[0] = [
120120
'name' => '$var1',
121121
'content' => '$var1=1',
122-
'has_attributes' => false,
123122
'default' => '1',
123+
'has_attributes' => false,
124124
'pass_by_reference' => false,
125125
'variable_length' => false,
126126
'type_hint' => '',
@@ -129,8 +129,8 @@ public function testDefaultValues()
129129
$expected[1] = [
130130
'name' => '$var2',
131131
'content' => "\$var2='value'",
132-
'has_attributes' => false,
133132
'default' => "'value'",
133+
'has_attributes' => false,
134134
'pass_by_reference' => false,
135135
'variable_length' => false,
136136
'type_hint' => '',
@@ -1020,6 +1020,7 @@ public function testCommentsInParameter()
10201020
'name' => '$param',
10211021
'content' => '// Leading comment.
10221022
?MyClass /*-*/ & /*-*/.../*-*/ $param /*-*/ = /*-*/ \'default value\' . /*-*/ \'second part\' // Trailing comment.',
1023+
'default' => '\'default value\' . /*-*/ \'second part\' // Trailing comment.',
10231024
'has_attributes' => false,
10241025
'pass_by_reference' => true,
10251026
'variable_length' => true,

0 commit comments

Comments
 (0)