1515 *
1616 * @covers Lunr\Shadow\LunrCliParser
1717 */
18- class LunrCliParserCheckObligatoryArgumentTest extends LunrCliParserTest
18+ class LunrCliParserCheckObligatoryArgumentTest extends LunrCliParserTestCase
1919{
2020
2121 /**
@@ -25,11 +25,11 @@ class LunrCliParserCheckObligatoryArgumentTest extends LunrCliParserTest
2525 */
2626 public function testCheckArgumentReturnsTrueForValidParameterWithOneArg (): void
2727 {
28- $ this ->set_reflection_property_value ('args ' , [ 'test.php ' , '-b ' , 'arg ' ]);
28+ $ this ->setReflectionPropertyValue ('args ' , [ 'test.php ' , '-b ' , 'arg ' ]);
2929
30- $ this ->set_reflection_property_value ('ast ' , [ 'b ' => [] ]);
30+ $ this ->setReflectionPropertyValue ('ast ' , [ 'b ' => [] ]);
3131
32- $ method = $ this ->get_accessible_reflection_method ('check_argument ' );
32+ $ method = $ this ->getReflectionMethod ('check_argument ' );
3333
3434 $ value = $ method ->invokeArgs ($ this ->class , [ 'b ' , 1 , 0 , 'b: ' ]);
3535
@@ -43,11 +43,11 @@ public function testCheckArgumentReturnsTrueForValidParameterWithOneArg(): void
4343 */
4444 public function testCheckArgumentReturnsTrueForValidParameterWithTwoArgs (): void
4545 {
46- $ this ->set_reflection_property_value ('args ' , [ 'test.php ' , '-e ' , 'arg1 ' , 'arg2 ' ]);
46+ $ this ->setReflectionPropertyValue ('args ' , [ 'test.php ' , '-e ' , 'arg1 ' , 'arg2 ' ]);
4747
48- $ this ->set_reflection_property_value ('ast ' , [ 'e ' => [] ]);
48+ $ this ->setReflectionPropertyValue ('ast ' , [ 'e ' => [] ]);
4949
50- $ method = $ this ->get_accessible_reflection_method ('check_argument ' );
50+ $ method = $ this ->getReflectionMethod ('check_argument ' );
5151
5252 $ value = $ method ->invokeArgs ($ this ->class , [ 'e ' , 1 , 0 , 'e:: ' ]);
5353
@@ -61,15 +61,15 @@ public function testCheckArgumentReturnsTrueForValidParameterWithTwoArgs(): void
6161 */
6262 public function testCheckArgumentAppendsFirstArgumentToAst (): void
6363 {
64- $ this ->set_reflection_property_value ('args ' , [ 'test.php ' , '-b ' , 'arg ' ]);
64+ $ this ->setReflectionPropertyValue ('args ' , [ 'test.php ' , '-b ' , 'arg ' ]);
6565
66- $ this ->set_reflection_property_value ('ast ' , [ 'b ' => [] ]);
66+ $ this ->setReflectionPropertyValue ('ast ' , [ 'b ' => [] ]);
6767
68- $ method = $ this ->get_accessible_reflection_method ('check_argument ' );
68+ $ method = $ this ->getReflectionMethod ('check_argument ' );
6969
7070 $ method ->invokeArgs ($ this ->class , [ 'b ' , 1 , 0 , 'b: ' ]);
7171
72- $ value = $ this ->get_reflection_property_value ('ast ' );
72+ $ value = $ this ->getReflectionPropertyValue ('ast ' );
7373
7474 $ this ->assertCount (1 , $ value ['b ' ]);
7575 $ this ->assertEquals ([ 'arg ' ], $ value ['b ' ]);
@@ -82,15 +82,15 @@ public function testCheckArgumentAppendsFirstArgumentToAst(): void
8282 */
8383 public function testCheckArgumentAppendsSecondArgumentToAst (): void
8484 {
85- $ this ->set_reflection_property_value ('args ' , [ 'test.php ' , '-e ' , 'arg1 ' , 'arg2 ' ]);
85+ $ this ->setReflectionPropertyValue ('args ' , [ 'test.php ' , '-e ' , 'arg1 ' , 'arg2 ' ]);
8686
87- $ this ->set_reflection_property_value ('ast ' , [ 'e ' => [] ]);
87+ $ this ->setReflectionPropertyValue ('ast ' , [ 'e ' => [] ]);
8888
89- $ method = $ this ->get_accessible_reflection_method ('check_argument ' );
89+ $ method = $ this ->getReflectionMethod ('check_argument ' );
9090
9191 $ method ->invokeArgs ($ this ->class , [ 'e ' , 1 , 0 , 'e:: ' ]);
9292
93- $ value = $ this ->get_reflection_property_value ('ast ' );
93+ $ value = $ this ->getReflectionPropertyValue ('ast ' );
9494
9595 $ this ->assertCount (2 , $ value ['e ' ]);
9696 $ this ->assertEquals ([ 'arg1 ' , 'arg2 ' ], $ value ['e ' ]);
@@ -103,11 +103,11 @@ public function testCheckArgumentAppendsSecondArgumentToAst(): void
103103 */
104104 public function testCheckArgumentReturnsFalseForArgumentMissing (): void
105105 {
106- $ this ->set_reflection_property_value ('args ' , [ 'test.php ' , '-b ' ]);
106+ $ this ->setReflectionPropertyValue ('args ' , [ 'test.php ' , '-b ' ]);
107107
108- $ this ->set_reflection_property_value ('ast ' , [ 'b ' => [] ]);
108+ $ this ->setReflectionPropertyValue ('ast ' , [ 'b ' => [] ]);
109109
110- $ method = $ this ->get_accessible_reflection_method ('check_argument ' );
110+ $ method = $ this ->getReflectionMethod ('check_argument ' );
111111
112112 $ this ->expectUserWarning ('Missing argument for -b ' );
113113
@@ -123,11 +123,11 @@ public function testCheckArgumentReturnsFalseForArgumentMissing(): void
123123 */
124124 public function testCheckArgumentReturnsFalseForArgumentMissingWithAnotherParameterAfter (): void
125125 {
126- $ this ->set_reflection_property_value ('args ' , [ 'test.php ' , '-b ' , '-c ' ]);
126+ $ this ->setReflectionPropertyValue ('args ' , [ 'test.php ' , '-b ' , '-c ' ]);
127127
128- $ this ->set_reflection_property_value ('ast ' , [ 'b ' => [] ]);
128+ $ this ->setReflectionPropertyValue ('ast ' , [ 'b ' => [] ]);
129129
130- $ method = $ this ->get_accessible_reflection_method ('check_argument ' );
130+ $ method = $ this ->getReflectionMethod ('check_argument ' );
131131
132132 $ this ->expectUserWarning ('Missing argument for -b ' );
133133
0 commit comments