Skip to content

Commit 934dd9f

Browse files
OskarStarknicolas-grekas
authored andcommitted
Migrate to static data providers using rector/rector
1 parent 2626c82 commit 934dd9f

20 files changed

+27
-27
lines changed

Tests/Controller/ContainerControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function testInstantiateControllerWhenControllerStartsWithABackslash($con
149149
$this->assertSame('action', $controller[1]);
150150
}
151151

152-
public function getControllers()
152+
public static function getControllers()
153153
{
154154
return [
155155
['\\'.ControllerTestService::class.'::action'],

Tests/Controller/ControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function testGetControllerWithStaticController($staticController, $return
141141
$this->assertSame($returnValue, $controller());
142142
}
143143

144-
public function getStaticControllers()
144+
public static function getStaticControllers()
145145
{
146146
return [
147147
[TestAbstractController::class.'::staticAction', 'foo'],

Tests/Controller/ErrorControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testInvokeController(Request $request, \Exception $exception, in
3636
self::assertStringContainsString($content, strtr($response->getContent(), ["\n" => '', ' ' => '']));
3737
}
3838

39-
public function getInvokeControllerDataProvider()
39+
public static function getInvokeControllerDataProvider()
4040
{
4141
yield 'default status code and HTML format' => [
4242
new Request(),

Tests/DataCollector/LoggerDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function testReset()
179179
$c->reset();
180180
}
181181

182-
public function getCollectTestData()
182+
public static function getCollectTestData()
183183
{
184184
yield 'simple log' => [
185185
1,

Tests/DataCollector/MemoryDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testBytesConversion($limit, $bytes)
3737
$this->assertEquals($bytes, $method->invoke($collector, $limit));
3838
}
3939

40-
public function getBytesConversionTestData()
40+
public static function getBytesConversionTestData()
4141
{
4242
return [
4343
['2k', 2048],

Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public function testBindings($bindingName)
308308
$this->assertEquals($expected, $locator->getArgument(0));
309309
}
310310

311-
public function provideBindings()
311+
public static function provideBindings()
312312
{
313313
return [
314314
[ControllerDummy::class.'$bar'],
@@ -343,7 +343,7 @@ public function testBindScalarValueToControllerArgument($bindingKey)
343343
$this->assertSame('foo_val', $locator->get('foo::fooAction')->get('someArg'));
344344
}
345345

346-
public function provideBindScalarValueToControllerArgument()
346+
public static function provideBindScalarValueToControllerArgument()
347347
{
348348
yield ['$someArg'];
349349
yield ['string $someArg'];

Tests/EventListener/DebugHandlersListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function testReplaceExistingExceptionHandler()
157157
$this->assertSame($userHandler, $eHandler->setExceptionHandler('var_dump'));
158158
}
159159

160-
public function provideLevelsAssignedToLoggers(): array
160+
public static function provideLevelsAssignedToLoggers(): array
161161
{
162162
return [
163163
[false, false, '0', null, null],

Tests/EventListener/DisallowRobotsIndexingListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testInvoke(?string $expected, array $responseArgs)
3636
$this->assertSame($expected, $response->headers->get('X-Robots-Tag'), 'Header doesn\'t match expectations');
3737
}
3838

39-
public function provideResponses(): iterable
39+
public static function provideResponses(): iterable
4040
{
4141
yield 'No header' => ['noindex', []];
4242

Tests/EventListener/ErrorListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function testHandleWithLoggerAndCustomConfiguration()
119119
$this->assertCount(1, $logger->getLogs('warning'));
120120
}
121121

122-
public function provider()
122+
public static function provider()
123123
{
124124
if (!class_exists(Request::class)) {
125125
return [[null, null]];
@@ -202,7 +202,7 @@ public function testOnControllerArguments(callable $controller)
202202
$this->assertSame('OK: foo', $event->getResponse()->getContent());
203203
}
204204

205-
public function controllerProvider()
205+
public static function controllerProvider()
206206
{
207207
yield [function (FlattenException $exception) {
208208
return new Response('OK: '.$exception->getMessage());

Tests/EventListener/ProfilerListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testCollectParameter(Request $request, ?bool $enable)
8787
$listener->onKernelResponse(new ResponseEvent($kernel, $request, Kernel::MAIN_REQUEST, $response));
8888
}
8989

90-
public function collectRequestProvider(): iterable
90+
public static function collectRequestProvider(): iterable
9191
{
9292
yield [Request::create('/'), null];
9393
yield [Request::create('/', 'GET', ['profile' => '1']), true];

0 commit comments

Comments
 (0)