Skip to content

Commit d07942e

Browse files
committed
[make:controller] [make:crud] [make:registration-form] [make:reset-password] [make:security:form-login] Fix error while generating PHPUnit tests
1 parent c86da84 commit d07942e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Maker/MakeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class: \sprintf('Tests\Controller\%s', $this->controllerClassData->getClassName(
148148
'route_path' => Str::asRoutePath($this->controllerClassData->getClassName(relative: true, withoutSuffix: true)),
149149
]);
150150

151-
if (!class_exists(WebTestCase::class)) {
151+
if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
152152
$io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
153153
}
154154
}

src/Maker/MakeCrud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class: \sprintf('Tests\Controller\%s', $entityClassDetails->getRelativeNameWitho
280280
]
281281
);
282282

283-
if (!class_exists(WebTestCase::class)) {
283+
if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
284284
$io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
285285
}
286286
}

src/Maker/MakeRegistrationForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
437437
], $userRepoVars)
438438
);
439439

440-
if (!class_exists(WebTestCase::class)) {
440+
if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
441441
$io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
442442
}
443443
}

src/Maker/MakeResetPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
382382
],
383383
);
384384

385-
if (!class_exists(WebTestCase::class)) {
385+
if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
386386
$io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
387387
}
388388
}

src/Maker/Security/MakeFormLogin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
210210
],
211211
);
212212

213-
if (!class_exists(WebTestCase::class)) {
213+
if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
214214
$io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
215215
}
216216
}

0 commit comments

Comments
 (0)