File tree 6 files changed +13
-6
lines changed 6 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ This will provide you with two new assertions:
131
131
132
132
Example::
133
133
134
- class ExampleTest extends \PHPUnit_Framework_TestCase
134
+ use PHPUnit\Framework\TestCase;
135
+
136
+ class ExampleTest extends TestCase
135
137
{
136
138
use \Symfony\Component\VarDumper\Test\VarDumperTestTrait;
137
139
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ console::
258
258
259
259
When using the Console component in a standalone project, use
260
260
:class: `Symfony\\ Component\\ Console\\ Application <Symfony\\ Component\\ Console\\ Application> `
261
- and extend the normal ``\PHPUnit_Framework_TestCase ``.
261
+ and extend the normal ``\PHPUnit\Framework\TestCase ``.
262
262
263
263
To be able to use the fully set up service container for your console tests
264
264
you can extend your test from
Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ snippet of PHP code is not natural and feels ugly. Here is a tentative PHPUnit
58
58
unit test for the above code::
59
59
60
60
// framework/test.php
61
- class IndexTest extends \PHPUnit_Framework_TestCase
61
+ use PHPUnit\Framework\TestCase;
62
+
63
+ class IndexTest extends TestCase
62
64
{
63
65
public function testHello()
64
66
{
Original file line number Diff line number Diff line change @@ -72,13 +72,14 @@ We are now ready to write our first test::
72
72
// example.com/tests/Simplex/Tests/FrameworkTest.php
73
73
namespace Simplex\Tests;
74
74
75
+ use PHPUnit\Framework\TestCase;
75
76
use Simplex\Framework;
76
77
use Symfony\Component\HttpFoundation\Request;
77
78
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
78
79
use Symfony\Component\Routing;
79
80
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
80
81
81
- class FrameworkTest extends \PHPUnit_Framework_TestCase
82
+ class FrameworkTest extends TestCase
82
83
{
83
84
public function testNotFoundHandling()
84
85
{
Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ of your bundle::
71
71
namespace AppBundle\Tests\Util;
72
72
73
73
use AppBundle\Util\Calculator;
74
+ use PHPUnit\Framework\TestCase;
74
75
75
- class CalculatorTest extends \PHPUnit_Framework_TestCase
76
+ class CalculatorTest extends TestCase
76
77
{
77
78
public function testAdd()
78
79
{
Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ it's easy to pass a mock object within a test::
63
63
use AppBundle\Salary\SalaryCalculator;
64
64
use Doctrine\ORM\EntityRepository;
65
65
use Doctrine\Common\Persistence\ObjectManager;
66
+ use PHPUnit\Framework\TestCase;
66
67
67
- class SalaryCalculatorTest extends \PHPUnit_Framework_TestCase
68
+ class SalaryCalculatorTest extends TestCase
68
69
{
69
70
public function testCalculateTotalSalary()
70
71
{
You can’t perform that action at this time.
0 commit comments