3 declare(strict_types
=1);
5 namespace PhpMyAdmin\Tests\Selenium
;
7 use PHPUnit\Framework\Attributes\CoversNothing
;
8 use PHPUnit\Framework\Attributes\Group
;
11 class LoginTest
extends TestBase
14 * Create a test database for this test class
16 protected static bool $createDatabase = false;
18 protected function setUp(): void
22 $this->logOutIfLoggedIn();
26 * Test for successful login
29 public function testSuccessfulLogin(): void
32 $this->waitForElement('xpath', '//*[@id="server-breadcrumb"]');
33 $this->assertTrue($this->isSuccessLogin());
34 $this->logOutIfLoggedIn();
38 * Test for unsuccessful login
41 public function testLoginWithWrongPassword(): void
43 $this->login('Admin', 'Admin');
44 $this->waitForElement('xpath', '//*[@class="alert alert-danger" and contains(.,\'Access denied for\')]');
45 $this->assertTrue($this->isUnsuccessLogin());