phpmyadmin/tests/end-to-end/XssTest.php
William Desportes 015d75c0d1
Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2026-02-24 15:36:06 +01:00

36 lines
857 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests\Selenium;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\Large;
#[CoversNothing]
#[Large]
class XssTest extends TestBase
{
/**
* Create a test database for this test class
*/
protected bool $createDatabase = false;
/**
* Tests the SQL query tab with a null query
*/
public function testQueryTabWithNullValue(): void
{
if ($this->isSafari()) {
self::markTestSkipped('Alerts not supported on Safari browser.');
}
$this->waitForElement('partialLinkText', 'SQL')->click();
$this->waitAjax();
$this->waitForElement('id', 'querybox');
$this->byId('button_submit_query')->click();
self::assertSame('Missing value in the form!', $this->alertText());
}
}