Skip to content

Commit 4495b7f

Browse files
OskarStarkxabbuh
authored andcommitted
Use createMock
1 parent 41a78cb commit 4495b7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Controller/AbstractControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public function testRenderViewWithForm()
431431
{
432432
$formView = new FormView();
433433

434-
$form = $this->getMockBuilder(FormInterface::class)->getMock();
434+
$form = $this->createMock(FormInterface::class);
435435
$form->expects($this->once())->method('createView')->willReturn($formView);
436436

437437
$twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
@@ -452,7 +452,7 @@ public function testRenderWithFormSubmittedAndInvalid()
452452
{
453453
$formView = new FormView();
454454

455-
$form = $this->getMockBuilder(FormInterface::class)->getMock();
455+
$form = $this->createMock(FormInterface::class);
456456
$form->expects($this->once())->method('createView')->willReturn($formView);
457457
$form->expects($this->once())->method('isSubmitted')->willReturn(true);
458458
$form->expects($this->once())->method('isValid')->willReturn(false);

0 commit comments

Comments
 (0)