Replace text_dir global var with LanguageManager::$textDir static
[phpmyadmin.git] / tests / selenium / LoginTest.php
blob7816dad72aa319e6f300df2bbc0887399e27fa18
1 <?php
3 declare(strict_types=1);
5 namespace PhpMyAdmin\Tests\Selenium;
7 use PHPUnit\Framework\Attributes\CoversNothing;
8 use PHPUnit\Framework\Attributes\Group;
10 #[CoversNothing]
11 class LoginTest extends TestBase
13 /**
14 * Create a test database for this test class
16 protected static bool $createDatabase = false;
18 protected function setUp(): void
20 parent::setUp();
22 $this->logOutIfLoggedIn();
25 /**
26 * Test for successful login
28 #[Group('large')]
29 public function testSuccessfulLogin(): void
31 $this->login();
32 $this->waitForElement('xpath', '//*[@id="server-breadcrumb"]');
33 $this->assertTrue($this->isSuccessLogin());
34 $this->logOutIfLoggedIn();
37 /**
38 * Test for unsuccessful login
40 #[Group('large')]
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());