Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ed30348

Browse filesBrowse files
committed
Merge branch '3.2'
* 3.2: [Form] backport DependencyInjectionExtension tests [Form] Fixed typo in a test after #21877
2 parents 0db9723 + 4d91022 commit ed30348
Copy full SHA for ed30348

File tree

Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed

‎src/Symfony/Component/Form/Tests/SimpleFormTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/SimpleFormTest.php
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,22 +517,20 @@ public function testSetDataIsIgnoredIfDataIsLocked()
517517
$this->assertSame('default', $form->getData());
518518
}
519519

520-
public function testPresSetDataChangesDataIfDataIsLocked()
520+
public function testPreSetDataChangesDataIfDataIsLocked()
521521
{
522522
$config = new FormConfigBuilder('name', null, $this->dispatcher);
523523
$config
524524
->setData('default')
525525
->setDataLocked(true)
526-
->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
526+
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
527527
$event->setData('foobar');
528528
});
529529
$form = new Form($config);
530530

531-
$form->submit(false);
532-
533-
$this->assertTrue($form->isValid());
534-
535531
$this->assertSame('foobar', $form->getData());
532+
$this->assertSame('foobar', $form->getNormData());
533+
$this->assertSame('foobar', $form->getViewData());
536534
}
537535

538536
public function testSubmitConvertsEmptyToNullIfNoTransformer()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.