Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b714419

Browse filesBrowse files
committed
ensure compatibility with older PHPUnit mocks
1 parent b6b5976 commit b714419
Copy full SHA for b714419

File tree

Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
1515
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1616
use Symfony\Component\DependencyInjection\Container;
17+
use Symfony\Component\Form\Form;
1718
use Symfony\Component\HttpFoundation\BinaryFileResponse;
1819
use Symfony\Component\HttpFoundation\File\File;
1920
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -486,7 +487,8 @@ public function testCreateNotFoundException()
486487

487488
public function testCreateForm()
488489
{
489-
$form = $this->getMockBuilder('Symfony\Component\Form\FormInterface')->getMock();
490+
$config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock();
491+
$form = new Form($config);
490492

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

‎src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\HttpKernel\EventListener\ProfilerListener;
2020
use Symfony\Component\HttpKernel\Exception\HttpException;
2121
use Symfony\Component\HttpKernel\Kernel;
22+
use Symfony\Component\HttpKernel\Profiler\Profile;
2223

2324
class ProfilerListenerTest extends TestCase
2425
{
@@ -27,9 +28,7 @@ class ProfilerListenerTest extends TestCase
2728
*/
2829
public function testKernelTerminate()
2930
{
30-
$profile = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile')
31-
->disableOriginalConstructor()
32-
->getMock();
31+
$profile = new Profile('token');
3332

3433
$profiler = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler')
3534
->disableOriginalConstructor()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.