1717use Symfony \Bundle \MakerBundle \Generator ;
1818use Symfony \Bundle \MakerBundle \InputConfiguration ;
1919use Symfony \Bundle \MakerBundle \Util \ClassNameDetails ;
20- use Symfony \Component \Console \Application ;
2120use Symfony \Component \Console \Command \Command ;
2221use Symfony \Component \Console \Input \ArrayInput ;
2322use Symfony \Component \Console \Output \BufferedOutput ;
@@ -61,28 +60,28 @@ private function makeGenerator(string $expectedClass, array &$capturedVars): Gen
6160
6261 $ generator ->expects ($ this ->once ())
6362 ->method ('generateClass ' )
64- ->willReturnCallback (function (string $ className , string $ template , array $ vars ) use (&$ capturedVars ): string {
63+ ->willReturnCallback (static function (string $ className , string $ template , array $ vars ) use (&$ capturedVars ): string {
6564 $ capturedVars = $ vars ;
6665
67- return 'src/Entity/Component/ ' . basename ($ className ). '.php ' ;
66+ return 'src/Entity/Component/ ' . basename ($ className ) . '.php ' ;
6867 });
6968
7069 $ generator ->expects ($ this ->once ())->method ('writeChanges ' );
7170
7271 return $ generator ;
7372 }
7473
75- public function testCommandName (): void
74+ public function test_command_name (): void
7675 {
7776 $ this ->assertSame ('make:api-component ' , MakeApiComponent::getCommandName ());
7877 }
7978
80- public function testCommandDescription (): void
79+ public function test_command_description (): void
8180 {
8281 $ this ->assertNotEmpty (MakeApiComponent::getCommandDescription ());
8382 }
8483
85- public function testGeneratesMinimalComponent (): void
84+ public function test_generates_minimal_component (): void
8685 {
8786 $ vars = [];
8887 $ generator = $ this ->makeGenerator ('App \\Entity \\Component \\MyComponent ' , $ vars );
@@ -96,7 +95,7 @@ public function testGeneratesMinimalComponent(): void
9695 $ this ->assertFalse ($ vars ['uploadable ' ]);
9796 }
9897
99- public function testGeneratesWithTimestamped (): void
98+ public function test_generates_with_timestamped (): void
10099 {
101100 $ vars = [];
102101 $ generator = $ this ->makeGenerator ('App \\Entity \\Component \\MyComponent ' , $ vars );
@@ -110,7 +109,7 @@ public function testGeneratesWithTimestamped(): void
110109 $ this ->assertFalse ($ vars ['uploadable ' ]);
111110 }
112111
113- public function testGeneratesWithPublishable (): void
112+ public function test_generates_with_publishable (): void
114113 {
115114 $ vars = [];
116115 $ generator = $ this ->makeGenerator ('App \\Entity \\Component \\MyComponent ' , $ vars );
@@ -124,7 +123,7 @@ public function testGeneratesWithPublishable(): void
124123 $ this ->assertFalse ($ vars ['uploadable ' ]);
125124 }
126125
127- public function testGeneratesWithUploadable (): void
126+ public function test_generates_with_uploadable (): void
128127 {
129128 $ vars = [];
130129 $ generator = $ this ->makeGenerator ('App \\Entity \\Component \\MyComponent ' , $ vars );
@@ -138,7 +137,7 @@ public function testGeneratesWithUploadable(): void
138137 $ this ->assertTrue ($ vars ['uploadable ' ]);
139138 }
140139
141- public function testGeneratesWithAllAnnotations (): void
140+ public function test_generates_with_all_annotations (): void
142141 {
143142 $ vars = [];
144143 $ generator = $ this ->makeGenerator ('App \\Entity \\Component \\MyComponent ' , $ vars );
@@ -152,7 +151,7 @@ public function testGeneratesWithAllAnnotations(): void
152151 $ this ->assertTrue ($ vars ['uploadable ' ]);
153152 }
154153
155- public function testOutputIncludesMigrationReminder (): void
154+ public function test_output_includes_migration_reminder (): void
156155 {
157156 $ vars = [];
158157 $ generator = $ this ->makeGenerator ('App \\Entity \\Component \\MyComponent ' , $ vars );
@@ -166,7 +165,7 @@ public function testOutputIncludesMigrationReminder(): void
166165 $ this ->assertStringContainsString ('review ' , $ text );
167166 }
168167
169- public function testInteractAsksAllThreeQuestions (): void
168+ public function test_interact_asks_all_three_questions (): void
170169 {
171170 $ command = $ this ->configuredCommand ();
172171
0 commit comments