Skip to content

Commit 52c2cb9

Browse files
More cleanups and fixes
1 parent c9f41f4 commit 52c2cb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/Controller/AbstractControllerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ public function testRenderFormTwig()
429429
{
430430
$formView = new FormView();
431431

432-
$form = $this->getMockBuilder(FormInterface::class)->getMock();
432+
$form = $this->createMock(FormInterface::class);
433433
$form->expects($this->once())->method('createView')->willReturn($formView);
434434

435-
$twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
435+
$twig = $this->createMock(Environment::class);
436436
$twig->expects($this->once())->method('render')->with('foo', ['form' => $formView, 'bar' => 'bar'])->willReturn('bar');
437437

438438
$container = new Container();
@@ -451,12 +451,12 @@ public function testRenderInvalidFormTwig()
451451
{
452452
$formView = new FormView();
453453

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

459-
$twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
459+
$twig = $this->createMock(Environment::class);
460460
$twig->expects($this->once())->method('render')->with('foo', ['form' => $formView, 'bar' => 'bar'])->willReturn('bar');
461461

462462
$container = new Container();

0 commit comments

Comments
 (0)