Skip to content

Commit

Permalink
ensure compatibility with older PHPUnit mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jan 17, 2019
1 parent 4401fe8 commit 9a75738
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tests/Controller/ControllerTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\JsonResponse;
Expand Down Expand Up @@ -486,7 +487,8 @@ public function testCreateNotFoundException()

public function testCreateForm()
{
$form = $this->getMockBuilder('Symfony\Component\Form\FormInterface')->getMock();
$config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock();
$form = new Form($config);

$formFactory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock();
$formFactory->expects($this->once())->method('create')->willReturn($form);
Expand Down

0 comments on commit 9a75738

Please sign in to comment.