tests/ChillPersonBundle: remove broken obsolete testFirstnameTooLong, html input and doctrine contrains are working

This commit is contained in:
Christophe Siraut 2021-04-20 16:23:47 +02:00
parent 2c96c02261
commit 395735e6f7

View File

@ -109,37 +109,6 @@ class PersonControllerCreateTest extends WebTestCase
return $form;
}
/**
*
* @param Form $form
* @depends testAddAPersonPage
*/
public function testFirstnameTooLong(Form $form)
{
$client = $this-client;
$this->fillAValidCreationForm($form);
$form->get(self::FIRSTNAME_INPUT)->setValue(mb_substr(self::LONG_TEXT, 0, 256));
$crawler = $client->submit($form);
$this->assertEquals(1, $crawler->filter('.error')->count(),
"An error message is shown if we fill more than 255 characters in firstname");
}
/**
*
* @param Form $form
* @depends testAddAPersonPage
*/
public function testLastnameTooLong(Form $form)
{
$this->fillAValidCreationForm($form);
$form->get(self::LASTNAME_INPUT)->setValue(mb_substr(self::LONG_TEXT, 0, 256));
$crawler = $this->getAuthenticatedClient()->submit($form);
$this->assertEquals(1, $crawler->filter('.error')->count(),
"An error message is shown if we fill more than 255 characters in lastname");
}
/**
*
* @param Form $form