8000 minor #42132 [FrameworkBundle] Fix broken mock (derrabus) · symfony/symfony@a4992b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit a4992b0

Browse files
committed
minor #42132 [FrameworkBundle] Fix broken mock (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] Fix broken mock | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A Backport from #42109. The mocked implementations of `getInheritData()` and `getName()` will currently return `null` which is something the real implementation would never do. Commits ------- 6d2f428 [FrameworkBundle] Fix broken mock
2 parents f8b18ce + 6d2f428 commit a4992b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,11 @@ public function testCreateNotFoundException()
503503

504504
public function testCreateForm()
505505
{
506-
$form = new Form($this->createMock(FormConfigInterface::class));
506+
$config = $this->createMock(FormConfigInterface::class);
507+
$config->method('getInheritData')->willReturn(false);
508+
$config->method('getName')->willReturn('');
509+
510+
$form = new Form($config);
507511

508512
$formFactory = $this->createMock(FormFactoryInterface::class);
509513
$formFactory->expects($this->once())->method('create')->willReturn($form);

0 commit comments

Comments
 (0)
0