diff --git a/src/Maker/MakeController.php b/src/Maker/MakeController.php index 59a87ba94..112035fa6 100644 --- a/src/Maker/MakeController.php +++ b/src/Maker/MakeController.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\MakerBundle\Maker; +use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Bundle\MakerBundle\ConsoleStyle; @@ -148,7 +149,7 @@ class: \sprintf('Tests\Controller\%s', $this->controllerClassData->getClassName( 'route_path' => Str::asRoutePath($this->controllerClassData->getClassName(relative: true, withoutSuffix: true)), ]); - if (!class_exists(WebTestCase::class)) { + if (!class_exists(TestCase::class)) { $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.'); } } diff --git a/src/Maker/MakeCrud.php b/src/Maker/MakeCrud.php index f535d24bd..195a873ac 100644 --- a/src/Maker/MakeCrud.php +++ b/src/Maker/MakeCrud.php @@ -16,6 +16,7 @@ use Doctrine\Inflector\InflectorFactory; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; +use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -280,7 +281,7 @@ class: \sprintf('Tests\Controller\%s', $entityClassDetails->getRelativeNameWitho ] ); - if (!class_exists(WebTestCase::class)) { + if (!class_exists(TestCase::class)) { $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.'); } } diff --git a/src/Maker/MakeRegistrationForm.php b/src/Maker/MakeRegistrationForm.php index 48a8ae34a..60202d61a 100644 --- a/src/Maker/MakeRegistrationForm.php +++ b/src/Maker/MakeRegistrationForm.php @@ -15,6 +15,7 @@ use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Mapping\Column; +use PHPUnit\Framework\TestCase; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Bridge\Twig\Mime\TemplatedEmail; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; @@ -437,7 +438,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen ], $userRepoVars) ); - if (!class_exists(WebTestCase::class)) { + if (!class_exists(TestCase::class)) { $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.'); } } diff --git a/src/Maker/MakeResetPassword.php b/src/Maker/MakeResetPassword.php index ae7b039c7..628600d57 100644 --- a/src/Maker/MakeResetPassword.php +++ b/src/Maker/MakeResetPassword.php @@ -13,6 +13,7 @@ use Doctrine\ORM\EntityManagerInterface; use PhpParser\Builder\Param; +use PHPUnit\Framework\TestCase; use Symfony\Bridge\Twig\AppVariable; use Symfony\Bridge\Twig\Mime\TemplatedEmail; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; @@ -382,7 +383,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen ], ); - if (!class_exists(WebTestCase::class)) { + if (!class_exists(TestCase::class)) { $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.'); } } diff --git a/src/Maker/Security/MakeFormLogin.php b/src/Maker/Security/MakeFormLogin.php index 641c048d9..951eaf810 100644 --- a/src/Maker/Security/MakeFormLogin.php +++ b/src/Maker/Security/MakeFormLogin.php @@ -13,6 +13,7 @@ use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -210,7 +211,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen ], ); - if (!class_exists(WebTestCase::class)) { + if (!class_exists(TestCase::class)) { $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.'); } }