8000 minor #59898 replace `assertEmpty()` with stricter assertions (xabbuh) · symfony/symfony@a9a1226 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9a1226

Browse files
committed
minor #59898 replace assertEmpty() with stricter assertions (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- replace `assertEmpty()` with stricter assertions | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT In the code we are strict about not using `empty()`. In my opinion it makes sense to be equally strict with our assertions. But I'd like to gather some feedback first before updating all places. Commits ------- 6550cb8 replace assertEmpty() with stricter assertions
2 parents db5108d + 6550cb8 commit a9a1226

File tree

69 files changed

+160
-155
lines changed

Some content is hidden

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

69 files changed

+160
-155
lines changed

src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function testClassNoAutoMapping()
210210
$this->assertSame(AutoMappingStrategy::DISABLED, $classMetadata->getAutoMappingStrategy());
211211

212212
$maxLengthMetadata = $classMetadata->getPropertyMetadata('maxLength');
213-
$this->assertEmpty($maxLengthMetadata);
213+
$this->assertSame([], $maxLengthMetadata);
214214

215215
/** @var PropertyMetadata[] $autoMappingExplicitlyEnabledMetadata */
216216
$autoMappingExplicitlyEnabledMetadata = $classMetadata->getPropertyMetadata('autoMappingExplicitlyEnabled');

src/Symfony/Bridge/PhpUnit/Tests/Metadata/AttributeReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testAttributesAreCached()
7171
$reader = new AttributeReader();
7272
$cacheRef = new \ReflectionProperty(AttributeReader::class, 'cache');
7373

74-
self::assertEmpty($cacheRef->getValue($reader));
74+
self::assertSame([], $cacheRef->getValue($reader));
7575

7676
$reader->forClass(FooBar::class, TimeSensitive::class);
7777

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ public function testDateErrorBubbling()
15921592
$form->get('date')->addError(new FormError('[trans]Error![/trans]'));
15931593
$view = $form->createView();
15941594

1595-
$this->assertEmpty($this->renderErrors($view));
1595+
$this->assertSame('', $this->renderErrors($view));
15961596
$this->assertNotEmpty($this->renderErrors($view['date']));
15971597
}
15981598

@@ -2213,7 +2213,7 @@ public function testTimeErrorBubbling()
22132213
$form->get('time')->addError(new FormError('[trans]Error![/trans]'));
22142214
$view = $form->createView();
22152215

2216-
$this->assertEmpty($this->renderErrors($view));
2216+
$this->assertSame('', $this->renderErrors($view));
22172217
$this->assertNotEmpty($this->renderErrors($view['time']));
22182218
}
22192219

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ public function testCustomDumper()
142142
'Custom dumper should be used to dump data.'
143143
);
144144

145-
$this->assertEmpty($output, 'Dumper output should be ignored.');
145+
$this->assertSame('', $output, 'Dumper output should be ignored.');
146146
}
147147
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ public function testMessengerServicesRemovedWhenDisabled()
796796
\ARRAY_FILTER_USE_KEY
797797
);
798798

799-
$this->assertEmpty($messengerDefinitions);
799+
$this->assertSame([], $messengerDefinitions);
800800
$this->assertFalse($container->hasDefinition('console.command.messenger_consume_messages'));
801801
$this->assertFalse($container->hasDefinition('console.command.messenger_debug'));
802802
$this->assertFalse($container->hasDefinition('console.command.messenger_stop_workers'));
@@ -1941,7 +1941,7 @@ public function testRemovesResourceCheckerConfigCacheFactoryArgumentOnlyIfNoDebu
19411941

19421942
$container = $this->createContainer(['kernel.debug' => false]);
19431943
(new FrameworkExtension())->load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true]]], $container);
1944-
$this->assertEmpty($container->getDefinition('config_cache_factory')->getArguments());
1944+
$this->assertSame([], $container->getDefinition('config_cache_factory')->getArguments());
19451945
}
19461946

19471947
public function testLoggerAwareRegistration()

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ApiAttributesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testMapQueryString(string $uri, array $query, string $expectedRe
3434
if ($expectedResponse) {
3535
self::assertJsonStringEqualsJsonString($expectedResponse, $response->getContent());
3636
} else {
37-
self::assertEmpty($response->getContent());
37+
self::assertSame('', $response->getContent());
3838
}
3939
self::assertSame($expectedStatusCode, $response->getStatusCode());
4040
}

src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testCollectWhenSecurityIsDisabled()
5454
$this->assertFalse($collector->supportsRoleHierarchy());
5555
$this->assertCount(0, $collector->getRoles());
5656
$this->assertCount(0, $collector->getInheritedRoles());
57-
$this->assertEmpty($collector->getUser());
57+
$this->assertSame('', $collector->getUser());
5858
$this->assertNull($collector->getFirewall());
5959
}
6060

@@ -73,7 +73,7 @@ public function testCollectWhenAuthenticationTokenIsNull()
7373
$this->assertTrue($collector->supportsRoleHierarchy());
7474
$this->assertCount(0, $collector->getRoles());
7575
$this->assertCount(0, $collector->getInheritedRoles());
76-
$this->assertEmpty($collector->getUser());
76+
$this->assertSame('', $collector->getUser());
7777
$this->assertNull($collector->getFirewall());
7878
}
7979

@@ -425,7 +425,7 @@ public function testGetVotersIfAccessDecisionManagerHasNoVoters()
425425

426426
$dataCollector->collect(new Request(), new Response());
427427

428-
$this->assertEmpty($dataCollector->getVoters());
428+
$this->assertSame([], $dataCollector->getVoters());
429429
}
430430

431431
public static function provideRoles(): array

src/Symfony/Component/Asset/Tests/Context/NullContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testGetBasePath()
2020
{
2121
$nullContext = new NullContext();
2222

23-
$this->assertEmpty($nullContext->getBasePath());
23+
$this->assertSame('', $nullContext->getBasePath());
2424
}
2525

2626
public function testIsSecure()

src/Symfony/Component/Asset/Tests/Context/RequestStackContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testGetBasePathEmpty()
2222
{
2323
$requestStackContext = new RequestStackContext(new RequestStack());
2424

25-
$this->assertEmpty($requestStackContext->getBasePath());
25+
$this->assertSame('', $requestStackContext->getBasePath());
2626
}
2727

2828
public function testGetBasePathSet()

src/Symfony/Component/Asset/Tests/VersionStrategy/EmptyVersionStrategyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testGetVersion()
2121
$emptyVersionStrategy = new EmptyVersionStrategy();
2222
$path = 'test-path';
2323

24-
$this->assertEmpty($emptyVersionStrategy->getVersion($path));
24+
$this->assertSame('', $emptyVersionStrategy->getVersion($path));
2525
}
2626

2727
public function testApplyVersion()

src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,10 +642,10 @@ public function testFollowRedirectDropPostMethod()
642642
$client->request('POST', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content);
643643

644644
$this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method on response code: '.$code.'.');
645-
$this->assertEmpty($client->getRequest()->getParameters(), '->followRedirect() drops parameters with POST method on response code: '.$code.'.');
646-
$this->assertEmpty($client->getRequest()->getFiles(), '->followRedirect() drops files with POST method on response code: '.$code.'.');
645+
$this->assertSame([], $client->getRequest()->getParameters(), '->followRedirect() drops parameters with POST method on response code: '.$code.'.');
646+
$this->assertSame([], $client->getRequest()->getFiles(), '->followRedirect() drops files with POST method on response code: '.$code.'.');
647647
$this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->followRedirect() keeps $_SERVER with POST method on response code: '.$code.'.');
648-
$this->assertEmpty($client->getRequest()->getContent(), '->followRedirect() drops content with POST method on response code: '.$code.'.');
648+
$this->assertNull($client->getRequest()->getContent(), '->followRedirect() drops content with POST method on response code: '.$code.'.');
649649
$this->assertSame('GET', $client->getRequest()->getMethod(), '->followRedirect() drops request method to GET on response code: '.$code.'.');
650650
}
651651
}

src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,6 @@ public function testCookieWithWildcardDomain()
247247
$cookieJar->set(new Cookie('foo', 'bar', null, '/', '.example.com'));
248248

249249
$this->assertEquals(['foo' => 'bar'], $cookieJar->allValues('http://www.example.com'));
250-
$this->assertEmpty($cookieJar->allValues('http://wwwexample.com'));
250+
$this->assertSame([], $cookieJar->allValues('http://wwwexample.com'));
251251
}
252252
}

src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testConfigureSchemaTableExists()
117117
$adapter = new DoctrineDbalAdapter($connection);
118118
$adapter->configureSchema($schema, $connection, fn () => true);
119119
$table = $schema->getTable('cache_items');
120-
$this->assertEmpty($table->getColumns(), 'The table was not overwritten');
120+
$this->assertSame([], $table->getColumns(), 'The table was not overwritten');
121121
}
122122

123123
/**

src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes()
2424
$node = new PrototypedArrayNode('root');
2525
$prototype = new ArrayNode(null, $node);
2626
$node->setPrototype($prototype);
27-
$this->assertEmpty($node->getDefaultValue());
27+
$this->assertSame([], $node->getDefaultValue());
2828
}
2929

3030
public function testGetDefaultValueReturnsDefaultValueForPrototypes()

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public function testSilentHelp()
291291
$tester = new ApplicationTester($application);
292292
$tester->run(['-h' => true, '-q' => true], ['decorated' => false]);
293293

294-
$this->assertEmpty($tester->getDisplay(true));
294+
$this->assertSame('', $tester->getDisplay(true));
295295
}
296296

297297
public function testGetInvalidCommand()

src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function testProcessMovesTagsFromDecoratedDefinitionToDecoratingDefinitio
197197

198198
$this->process($container);
199199

200-
$this->assertEmpty($container->getDefinition('baz.inner')->getTags());
200+
$this->assertSame([], $container->getDefinition('baz.inner')->getTags());
201201
$this->assertEquals(['bar' => ['attr' => 'baz'], 'foobar' => ['attr' => 'bar'], 'container.decorator' => [['id' => 'foo', 'inner' => 'baz.inner']]], $container->getDefinition('baz')->getTags());
202202
}
203203

@@ -220,7 +220,7 @@ public function testProcessMovesTagsFromDecoratedDefinitionToDecoratingDefinitio
220220

221221
$this->process($container);
222222

223-
$this->assertEmpty($container->getDefinition('deco1')->getTags());
223+
$this->assertSame([], $container->getDefinition('deco1')->getTags());
224224
$this->assertEquals(['bar' => ['attr' => 'baz'], 'container.decorator' => [['id' => 'foo', 'inner' => 'deco1.inner']]], $container->getDefinition('deco2')->getTags());
225225
}
226226

src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public function testPassOrderingWithoutPasses()
4545
$config->setOptimizationPasses([]);
4646
$config->setRemovingPasses([]);
4747

48-
$this->assertEmpty($config->getBeforeOptimizationPasses());
49-
$this->assertEmpty($config->getAfterRemovingPasses());
50-
$this->assertEmpty($config->getBeforeRemovingPasses());
51-
$this->assertEmpty($config->getOptimizationPasses());
52-
$this->assertEmpty($config->getRemovingPasses());
48+
$this->assertSame([], $config->getBeforeOptimizationPasses());
49+
$this->assertSame([], $config->getAfterRemovingPasses());
50+
$this->assertSame([], $config->getBeforeRemovingPasses());
51+
$this->assertSame([], $config->getOptimizationPasses());
52+
$this->assertSame([], $config->getRemovingPasses());
5353
}
5454
}

src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testProcess()
3939

4040
$parent = '.instanceof.'.parent::class.'.0.foo';
4141
$def = $container->getDefinition('foo');
42-
$this->assertEmpty($def->getInstanceofConditionals());
42+
$this->assertSame([], $def->getInstanceofConditionals());
4343
$this->assertInstanceOf(ChildDefinition::class, $def);
4444
$this->assertTrue($def->isAutowired());
4545
$this->assertSame($parent, $def->getParent());
@@ -266,10 +266,10 @@ public function testMergeReset()
266266

267267
$abstract = $container->getDefinition('.abstract.instanceof.bar');
268268

269-
$this->assertEmpty($abstract->getArguments());
270-
$this->assertEmpty($abstract->getMethodCalls());
269+
$this->assertSame([], $abstract->getArguments());
270+
$this->assertSame([], $abstract->getMethodCalls());
271271
$this->assertNull($abstract->getDecoratedService());
272-
$this->assertEmpty($abstract->getTags());
272+
$this->assertSame([], $abstract->getTags());
273273
$this->assertTrue($abstract->isAbstract());
274274
}
275275

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ public function testAddObjectResource()
11501150
$container->setResourceTracking(false);
11511151
$container->addObjectResource(new \BarClass());
11521152

1153-
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
1153+
$this->assertSame([], $container->getResources(), 'No resources get registered without resource tracking');
11541154

11551155
$container->setResourceTracking(true);
11561156
$container->addObjectResource(new \BarClass());
@@ -1173,7 +1173,7 @@ public function testGetReflectionClass()
11731173
$container->setResourceTracking(false);
11741174
$r1 = $container->getReflectionClass('BarClass');
11751175

1176-
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
1176+
$this->assertSame([], $container->getResources(), 'No resources get registered without resource tracking');
11771177

11781178
$container->setResourceTracking(true);
11791179
$r2 = $container->getReflectionClass('BarClass');
@@ -1213,7 +1213,7 @@ public function testCompilesClassDefinitionsOfLazyServices()
12131213
{
12141214
$container = new ContainerBuilder();
12151215

1216-
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
1216+
$this->assertSame([], $container->getResources(), 'No resources get registered without resource tracking');
12171217

12181218
$container->register('foo', 'BarClass')->setPublic(true);
12191219
$container->getDefinition('foo')->setLazy(true);
@@ -1372,7 +1372,7 @@ public function testExtensionConfig()
13721372
$container = new ContainerBuilder();
13731373

13741374
$configs = $container->getExtensionConfig('foo');
1375-
$this->assertEmpty($configs);
1375+
$this->assertSame([], $configs);
13761376

13771377
$first = ['foo' => 'bar'];
13781378
$container->prependExtensionConfig('foo', $first);

src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ public function testLazyArgumentProvideGenerator()
986986
}
987987
}
988988

989-
$this->assertEmpty(iterator_to_array($lazyContext->lazyEmptyValues));
989+
$this->assertSame([], iterator_to_array($lazyContext->lazyEmptyValues));
990990
}
991991

992992
public function testNormalizedId()

src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ public function testAnonymousServicesInInstanceof()
850850
$anonymous = $container->getDefinition((string) $args['foo']);
851851
$this->assertEquals('Anonymous', $anonymous->getClass());
852852
$this->assertFalse($anonymous->isPublic());
853-
$this->assertEmpty($anonymous->getInstanceofConditionals());
853+
$this->assertSame([], $anonymous->getInstanceofConditionals());
854854

855855
$this->assertFalse($container->has('Bar'));
856856
}

src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testMergeWhereFirstBagIsEmptyWillWork()
6666
// initialize placeholder only in second bag
6767
$secondBag->get($parameter);
6868

69-
$this->assertEmpty($firstBag->getEnvPlaceholders());
69+
$this->assertSame([], $firstBag->getEnvPlaceholders());
7070

7171
$firstBag->mergeEnvPlaceholders($secondBag);
7272
$mergedPlaceholders = $firstBag->getEnvPlaceholders();

src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testHtml5ParserWithInvalidHeadedContent(string $content)
4343
{
4444
$crawler = $this->createCrawler();
4545
$crawler->addHtmlContent($content);
46-
self::assertEmpty($crawler->filterXPath('//h1')->text(), '->addHtmlContent failed as expected');
46+
self::assertSame('', $crawler->filterXPath('//h1')->text(), '->addHtmlContent failed as expected');
4747
}
4848

4949
public function testHtml5ParserNotSameAsNativeParserForSpecificHtml()

src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function testItReturnsNoOrphanedEventsWhenCreated()
182182
{
183183
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
184184
$events = $tdispatcher->getOrphanedEvents();
185-
$this->assertEmpty($events);
185+
$this->assertSame([], $events);
186186
}
187187

188188
public function testItReturnsOrphanedEventsAfterDispatch()
@@ -200,7 +200,7 @@ public function testItDoesNotReturnHandledEvents()
200200
$tdispatcher->addListener('foo', function () {});
201201
$tdispatcher->dispatch(new Event(), 'foo');
202202
$events = $tdispatcher->getOrphanedEvents();
203-
$this->assertEmpty($events);
203+
$this->assertSame([], $events);
204204
}
205205

206206
public function testLogger()

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ public function testSubmitSingleExpandedRequired()
878878

879879
$this->assertSame('b', $form->getData());
880880
$this->assertSame('b', $form->getViewData());
881-
$this->assertEmpty($form->getExtraData());
881+
$this->assertSame([], $form->getExtraData());
882882
$this->assertTrue($form->isSynchronized());
883883

884884
$this->assertFalse($form[0]->getData());
@@ -906,7 +906,7 @@ public function testSubmitSingleExpandedRequiredInvalidChoice()
906906

907907
$this->assertNull($form->getData());
908908
$this->assertSame('foobar', $form->getViewData());
909-
$this->assertEmpty($form->getExtraData());
909+
$this->assertSame([], $form->getExtraData());
910910
$this->assertFalse($form->isSynchronized());
911911

912912
$this->assertFalse($form[0]->getData());
@@ -934,7 +934,7 @@ public function testSubmitSingleExpandedNonRequired()
934934

935935
$this->assertSame('b', $form->getData());
936936
$this->assertSame('b', $form->getViewData());
937-
$this->assertEmpty($form->getExtraData());
937+
$this->assertSame([], $form->getExtraData());
938938
$this->assertTrue($form->isSynchronized());
939939

940940
$this->assertFalse($form['placeholder']->getData());
@@ -964,7 +964,7 @@ public function testSubmitSingleExpandedNonRequiredInvalidChoice()
964964

965965
$this->assertNull($form->getData());
966966
$this->assertSame('foobar', $form->getViewData());
967-
$this->assertEmpty($form->getExtraData());
967+
$this->assertSame([], $form->getExtraData());
968968
$this->assertFalse($form->isSynchronized());
969969

970970
$this->assertFalse($form[0]->getData());
@@ -1348,7 +1348,7 @@ public function testSubmitMultipleExpanded()
13481348

13491349
$this->assertSame(['a', 'c'], $form->getData());
13501350
$this->assertSame(['a', 'c'], $form->getViewData());
1351-
$this->assertEmpty($form->getExtraData());
1351+
$this->assertSame([], $form->getExtraData());
13521352
$this->assertTrue($form->isSynchronized());
13531353

13541354
$this->assertTrue($form[0]->getData());
@@ -1375,7 +1375,7 @@ public function testSubmitMultipleExpandedInvalidScalarChoice()
13751375

13761376
$this->assertNull($form->getData());
13771377
$this->assertSame('foobar', $form->getViewData());
1378-
$this->assertEmpty($form->getExtraData());
1378+
$this->assertSame([], $form->getExtraData());
13791379
$this->assertFalse($form->isSynchronized());
13801380

13811381
$this->assertFalse($form[0]->getData());
@@ -1402,7 +1402,7 @@ public function testSubmitMultipleExpandedInvalidArrayChoice()
14021402

14031403
$this->assertSame(['a'], $form->getData());
14041404
$this->assertSame(['a'], $form->getViewData());
1405-
$this->assertEmpty($form->getExtraData());
1405+
$this->assertSame([], $form->getExtraData());
14061406
$this->assertFalse($form->isValid());
14071407

14081408
$this->assertTrue($form[0]->getData());

0 commit comments

Comments
 (0)
0