Файловый менеджер - Редактировать - /home/avadvi5/calendar.aeronextgen.com/davis/vendor/symfony/maker-bundle/templates/registration/Test.WithoutVerify.tpl.php
Ðазад
<?= "<?php\n" ?> namespace App\Tests; <?= $use_statements ?> class RegistrationControllerTest extends WebTestCase { private KernelBrowser $client; private <?= $repository_class_name ?> $userRepository; protected function setUp(): void { $this->client = static::createClient(); // Ensure we have a clean database $container = static::getContainer(); /** @var EntityManager $em */ $em = $container->get('doctrine')->getManager(); $this->userRepository = $container->get(<?= $repository_class_name ?>::class); foreach ($this->userRepository->findAll() as $user) { $em->remove($user); } $em->flush(); } public function testRegister(): void { // Register a new user $this->client->request('GET', '/register'); self::assertResponseIsSuccessful(); self::assertPageTitleContains('Register'); $this->client->submitForm('Register', [ 'registration_form[email]' => 'me@example.com', 'registration_form[plainPassword]' => 'password', 'registration_form[agreeTerms]' => true, ]); // Ensure the response redirects after submitting the form, the user exists, and is not verified // self::assertResponseRedirects('/'); @TODO: set the appropriate path that the user is redirected to. self::assertCount(1, $this->userRepository->findAll()); } }
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка