Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/UsersTest.php
Show First 20 Lines • Show All 1,175 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
public function dataValidateAlias(): array | public function dataValidateAlias(): array | ||||
{ | { | ||||
$this->refreshApplication(); | $this->refreshApplication(); | ||||
$public_domains = Domain::getPublicDomains(); | $public_domains = Domain::getPublicDomains(); | ||||
$domain = reset($public_domains); | $domain = reset($public_domains); | ||||
$john = $this->getTestUser('john@kolab.org'); | $john = $this->getTestUser('john@kolab.org'); | ||||
$jack = $this->getTestUser('jack@kolab.org'); | |||||
$user = $this->getTestUser('UsersControllerTest1@userscontroller.com'); | $user = $this->getTestUser('UsersControllerTest1@userscontroller.com'); | ||||
return [ | return [ | ||||
// Invalid format | // Invalid format | ||||
["$domain", $john, 'The specified alias is invalid.'], | ["$domain", $john, 'The specified alias is invalid.'], | ||||
[".@$domain", $john, 'The specified alias is invalid.'], | [".@$domain", $john, 'The specified alias is invalid.'], | ||||
["test123456@localhost", $john, 'The specified domain is invalid.'], | ["test123456@localhost", $john, 'The specified domain is invalid.'], | ||||
["test123456@unknown-domain.org", $john, 'The specified domain is invalid.'], | ["test123456@unknown-domain.org", $john, 'The specified domain is invalid.'], | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |