/** * Verify incorrect credentials message while login to admin * * @param AdminAuthLogin $adminAuth * @param User $customAdmin * @return void */ public function processAssert(AdminAuthLogin $adminAuth, User $customAdmin) { $adminAuth->open(); $adminAuth->getLoginBlock()->fill($customAdmin); $adminAuth->getLoginBlock()->submit(); \PHPUnit_Framework_Assert::assertEquals(self::INVALID_CREDENTIALS_MESSAGE, $adminAuth->getMessagesBlock()->getErrorMessages(), 'Message "' . self::INVALID_CREDENTIALS_MESSAGE . '" is not visible.'); }
/** * Verify that user account has been locked. * * @param AdminAuthLogin $adminAuth * @return void */ public function processAssert(AdminAuthLogin $adminAuth) { $ignoreCase = true; \PHPUnit_Framework_Assert::assertContains(self::USER_ACCOUNT_DISABLED_MESSAGE, $adminAuth->getMessagesBlock()->getErrorMessage(), 'Message "' . self::USER_ACCOUNT_DISABLED_MESSAGE . '" is not visible.', $ignoreCase); }
/** * Assert that user reset password failed message is present on user login page. * * @param AdminAuthLogin $adminAuth * @return void */ public function processAssert(AdminAuthLogin $adminAuth) { \PHPUnit_Framework_Assert::assertEquals(self::TOO_MANY_RESET_REQUESTS_MESSAGE, $adminAuth->getMessagesBlock()->getErrorMessage(), 'Wrong user reset password failed message is displayed.'); }