Skip to content
Permalink
Browse files

minor #29914 ensure compatibility with older PHPUnit mocks (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

ensure compatibility with older PHPUnit mocks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | alternative to #29913
| License       | MIT
| Doc PR        |

Commits
-------

b714419 ensure compatibility with older PHPUnit mocks
  • Loading branch information...
fabpot committed Jan 17, 2019
2 parents b6b5976 + b714419 commit e231edd5dcc5325277cc1418b34fb92db483c228
@@ -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;
@@ -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);
@@ -19,6 +19,7 @@
use Symfony\Component\HttpKernel\EventListener\ProfilerListener;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Profiler\Profile;
class ProfilerListenerTest extends TestCase
{
@@ -27,9 +28,7 @@ class ProfilerListenerTest extends TestCase
*/
public function testKernelTerminate()
{
$profile = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile')
->disableOriginalConstructor()
->getMock();
$profile = new Profile('token');
$profiler = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler')
->disableOriginalConstructor()

0 comments on commit e231edd

Please sign in to comment.
You can’t perform that action at this time.