8000 [Tests] Streamline · mathroc/symfony@918f677 · GitHub
[go: up one dir, main page]

Skip to content

Commit 918f677

Browse files
OskarStarknicolas-grekas
authored andcommitted
[Tests] Streamline
1 parent 4e86cf2 commit 918f677

File tree

65 files changed

+147
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+147
-144
lines changed

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function testMappingTypeDetection()
197197
$this->assertSame($mappingType, \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute');
198198
}
199199

200-
public static function providerBasicDrivers()
200+
public static function providerBasicDrivers(): array
201201
{
202202
return [
203203
['doctrine.orm.cache.apc.class', ['type' => 'apc']],
@@ -276,7 +276,7 @@ public function testUnrecognizedCacheDriverException()
276276
$this->invokeLoadCacheDriver($objectManager, $container, $cacheName);
277277
}
278278

279-
public static function providerBundles()
279+
public static function providerBundles(): iterable
280280
{
281281
yield ['AnnotationsBundle', \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute', '/Entity'];
282282
yield ['AnnotationsOneLineBundle', \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute', '/Entity'];

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function testChoiceTranslationDomainIsDisabledByDefault($expanded)
158158
}
159159
}
160160

161-
public static function choiceTranslationDomainProvider()
161+
public static function choiceTranslationDomainProvider(): array
162162
{
163163
return [
164164
[false],
@@ -240,8 +240,6 @@ public function testConfigureQueryBuilderWithClosureReturningNonQueryBuilder()
240240
return new \stdClass();
241241
},
242242
]);
243-
244-
$field->submit('2');
245243
}
246244

247245
public function testConfigureQueryBuilderWithClosureReturningNullUseDefault()

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public function testValidateResultTypes($entity1, $result)
479479
$this->assertNoViolation();
480480
}
481481

482-
public static function resultTypesProvider()
482+
public static function resultTypesProvider(): array
483483
{
484484
$entity = new SingleIntIdEntity(1, 'foo');
485485

src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testVerbosityMapping($verbosity, $level, $isHandling, array $map
8989
$this->assertFalse($handler->handle($infoRecord), 'The handler finished handling the log.');
9090
}
9191

92-
public static function provideVerbosityMappingTests()
92+
public static function provideVerbosityMappingTests(): array
9393
{
9494
return [
9595
[OutputInterface::VERBOSITY_QUIET, Logger::ERROR, true],

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ public function testToleratesForIndividualGroups(string $deprecationsHelper, arr
249249
}
250250
}
251251

252-
public static function provideDataForToleratesForGroup() {
253-
252+
public static function provideDataForToleratesForGroup(): iterable
253+
{
254254
yield 'total threshold not reached' => ['max[total]=1', [
255255
'unsilenced' => 0,
256256
'self' => 0,

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testItMutesOnlySpecificErrorMessagesWhenTheCallingCodeIsInPhpuni
9797
$this->assertSame($muted, $deprecation->isMuted());
9898
}
9999

100-
public static function mutedProvider()
100+
public static function mutedProvider(): iterable
101101
{
102102
yield 'not from phpunit, and not a whitelisted message' => [
103103
false,
@@ -147,7 +147,7 @@ public function testItTakesMutesDeprecationFromPhpUnitFiles()
147147
$this->assertTrue($deprecation->isMuted());
148148
}
149149

150-
public static function providerGetTypeDetectsSelf()
150+
public static function providerGetTypeDetectsSelf(): array
151151
{
152152
return [
153153
'not_from_vendors_file' => [Deprecation::TYPE_SELF, '', 'MyClass1', __FILE__],
@@ -182,7 +182,7 @@ public function testGetTypeDetectsSelf(string $expectedType, string $message, st
182182
$this->assertSame($expectedType, $deprecation->getType());
183183
}
184184

185-
public static function providerGetTypeUsesRightTrace()
185+
public static function providerGetTypeUsesRightTrace(): array
186186
{
187187
$vendorDir = self::getVendorDir();
188188
$fakeTrace = [

src/Symfony/Bridge/Twig/Tests/AppVa 10000 riableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testDebug($debugFlag)
4343
$this->assertEquals($debugFlag, $this->appVariable->getDebug());
4444
}
4545

46-
public static function debugDataProvider()
46+
public static function debugDataProvider(): array
4747
{
4848
return [
4949
'debug on' => [true],

src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function testComplete(array $input, array $expectedSuggestions)
150150
$this->assertSame($expectedSuggestions, $tester->complete($input));
151151
}
152152

153-
public static function provideCompletionSuggestions()
153+
public static function provideCompletionSuggestions(): iterable
154154
{
155155
yield 'option' => [['--format', ''], ['txt', 'json', 'github']];
156156
}

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function testThemeBlockInheritanceUsingDynamicExtend()
100100
);
101101
}
102102

103-
public static function isSelectedChoiceProvider()
103+
public static function isSelectedChoiceProvider(): array
104104
{
105105
return [
106106
[true, '0', '0'],
@@ -150,7 +150,7 @@ public function testStartTagHasActionAttributeWhenActionIsZero()
150150
$this->assertSame('<form name="form" method="get" action="0">', $html);
151151
}
152152

153-
public static function isRootFormProvider()
153+
public static function isRootFormProvider(): array
154154
{
155155
return [
156156
[true, new FormView()],
@@ -381,14 +381,14 @@ protected function setTheme(FormView $view, array $themes, $useDefaultThemes = t
381381
$this->renderer->setTheme($view, $themes, $useDefaultThemes);
382382
}
383383

384-
public static function themeBlockInheritanceProvider()
384+
public static function themeBlockInheritanceProvider(): array
385385
{
386386
return [
387387
[['theme.html.twig']],
388388
];
389389
}
390390

391-
public static function themeInheritanceProvider()
391+
public static function themeInheritanceProvider(): array
392392
{
393393
return [
394394
[['parent_label.html.twig'], ['child_label.html.twig']],

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testWarmUp(array $loaders)
4040
$this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit());
4141
}
4242

43-
public static function loaderProvider()
43+
public static function loaderProvider(): array
4444
{
4545
return [
4646
[

0 commit comments

Comments
 (0)
0