-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ class Bootstrap | |
* Predefined admin user credentials | ||
*/ | ||
public const ADMIN_NAME = 'user'; | ||
public const ADMIN_PASSWORD = 'password1'; | ||
public const ADMIN_PASSWORD = 'password1234'; | ||
public const ADMIN_EMAIL = '[email protected]'; | ||
public const ADMIN_FIRSTNAME = 'firstname'; | ||
public const ADMIN_LASTNAME = 'lastname'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,14 +62,14 @@ public function testExecute(): void | |
{ | ||
$options = [ | ||
'--' . AdminAccount::KEY_USER => 'user', | ||
'--' . AdminAccount::KEY_PASSWORD => '123123q', | ||
'--' . AdminAccount::KEY_PASSWORD => '1234512345q!', | ||
'--' . AdminAccount::KEY_EMAIL => '[email protected]', | ||
'--' . AdminAccount::KEY_FIRST_NAME => 'John', | ||
'--' . AdminAccount::KEY_LAST_NAME => 'Doe' | ||
]; | ||
$data = [ | ||
AdminAccount::KEY_USER => 'user', | ||
AdminAccount::KEY_PASSWORD => '123123q', | ||
AdminAccount::KEY_PASSWORD => '1234512345q!', | ||
AdminAccount::KEY_EMAIL => '[email protected]', | ||
AdminAccount::KEY_FIRST_NAME => 'John', | ||
AdminAccount::KEY_LAST_NAME => 'Doe', | ||
|
@@ -93,7 +93,7 @@ public function testInteraction(): void | |
|
||
$this->questionHelperMock | ||
->method('ask') | ||
->willReturnOnConsecutiveCalls('admin', 'Password123', '[email protected]', 'John', 'Doe'); | ||
->willReturnOnConsecutiveCalls('admin', 'Password1234', '[email protected]', 'John', 'Doe'); | ||
|
||
// We override the standard helper with our mock | ||
$this->command->getHelperSet()->set($this->questionHelperMock, 'question'); | ||
|
@@ -102,7 +102,7 @@ public function testInteraction(): void | |
|
||
$expectedData = [ | ||
'admin-user' => 'admin', | ||
'admin-password' => 'Password123', | ||
'admin-password' => 'Password1234', | ||
'admin-email' => '[email protected]', | ||
'admin-firstname' => 'John', | ||
'admin-lastname' => 'Doe', | ||
|
@@ -189,38 +189,38 @@ public static function validateDataProvider(): array | |
{ | ||
return [ | ||
[ | ||
[null, 'Doe', 'admin', '[email protected]', '123123q', '123123q'], | ||
[null, 'Doe', 'admin', '[email protected]', '1234512345q!', '1234512345q!'], | ||
['"First Name" is required. Enter and try again.'] | ||
], | ||
[ | ||
['John', null, null, '[email protected]', '123123q', '123123q'], | ||
['John', null, null, '[email protected]', '1234512345q!', '1234512345q!'], | ||
['"User Name" is required. Enter and try again.', '"Last Name" is required. Enter and try again.'], | ||
], | ||
[['John', 'Doe', 'admin', null, '123123q', '123123q'], ['Please enter a valid email.']], | ||
[['John', 'Doe', 'admin', null, '1234512345q!', '1234512345q!'], ['Please enter a valid email.']], | ||
[ | ||
['John', 'Doe', 'admin', 'test', '123123q', '123123q'], | ||
['John', 'Doe', 'admin', 'test', '1234512345q!', '1234512345q!'], | ||
["'test' is not a valid email address in the basic format local-part@hostname"] | ||
], | ||
[ | ||
['John', 'Doe', 'admin', '[email protected]', '', ''], | ||
[ | ||
'Password is required field.', | ||
'Your password must be at least 7 characters.', | ||
'Your password must be at least 12 characters.', | ||
'Your password must include both numeric and alphabetic characters.' | ||
] | ||
], | ||
[ | ||
['John', 'Doe', 'admin', '[email protected]', '123123', '123123'], | ||
[ | ||
'Your password must be at least 7 characters.', | ||
'Your password must be at least 12 characters.', | ||
'Your password must include both numeric and alphabetic characters.' | ||
] | ||
], | ||
[ | ||
['John', 'Doe', 'admin', '[email protected]', '1231231', '1231231'], | ||
['John', 'Doe', 'admin', '[email protected]', '123123123123', '123123123123'], | ||
['Your password must include both numeric and alphabetic characters.'] | ||
], | ||
[['John', 'Doe', 'admin', '[email protected]', '123123q', '123123q'], []], | ||
[['John', 'Doe', 'admin', '[email protected]', '1234512345q!', '1234512345q!'], []], | ||
]; | ||
} | ||
} |