File tree Expand file tree Collapse file tree 6 files changed +13
-6
lines changed Expand file tree Collapse file tree 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:
131131
132132Example::
133133
134- class ExampleTest extends \PHPUnit_Framework_TestCase
134+ use PHPUnit\Framework\TestCase;
135+
136+ class ExampleTest extends TestCase
135137 {
136138 use \Symfony\Component\VarDumper\Test\VarDumperTestTrait;
137139
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ console::
258258
259259 When using the Console component in a standalone project, use
260260 :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 ``.
262262
263263To be able to use the fully set up service container for your console tests
264264you 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
5858unit test for the above code::
5959
6060 // framework/test.php
61- class IndexTest extends \PHPUnit_Framework_TestCase
61+ use PHPUnit\Framework\TestCase;
62+
63+ class IndexTest extends TestCase
6264 {
6365 public function testHello()
6466 {
Original file line number Diff line number Diff line change @@ -72,13 +72,14 @@ We are now ready to write our first test::
7272 // example.com/tests/Simplex/Tests/FrameworkTest.php
7373 namespace Simplex\Tests;
7474
75+ use PHPUnit\Framework\TestCase;
7576 use Simplex\Framework;
7677 use Symfony\Component\HttpFoundation\Request;
7778 use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
7879 use Symfony\Component\Routing;
7980 use Symfony\Component\Routing\Exception\ResourceNotFoundException;
8081
81- class FrameworkTest extends \PHPUnit_Framework_TestCase
82+ class FrameworkTest extends TestCase
8283 {
8384 public function testNotFoundHandling()
8485 {
Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ of your bundle::
7171 namespace AppBundle\Tests\Util;
7272
7373 use AppBundle\Util\Calculator;
74+ use PHPUnit\Framework\TestCase;
7475
75- class CalculatorTest extends \PHPUnit_Framework_TestCase
76+ class CalculatorTest extends TestCase
7677 {
7778 public function testAdd()
7879 {
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::
6363 use AppBundle\Salary\SalaryCalculator;
6464 use Doctrine\ORM\EntityRepository;
6565 use Doctrine\Common\Persistence\ObjectManager;
66+ use PHPUnit\Framework\TestCase;
6667
67- class SalaryCalculatorTest extends \PHPUnit_Framework_TestCase
68+ class SalaryCalculatorTest extends TestCase
6869 {
6970 public function testCalculateTotalSalary()
7071 {
You can’t perform that action at this time.
0 commit comments