phpmyadmin/test/classes/ResponseTest.php
Maurício Meneghini Fauth 7b669a1c51
Add test class for the Response class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-11 09:55:47 -03:00

35 lines
730 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Response;
/**
* @covers \PhpMyAdmin\Response
*/
class ResponseTest extends AbstractTestCase
{
protected function setUp(): void
{
parent::setUp();
$GLOBALS['config']->enableBc();
$GLOBALS['lang'] = 'en';
$GLOBALS['server'] = 1;
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
}
public function testSetAjax(): void
{
$_REQUEST = [];
$response = Response::getInstance();
$response->setAjax(true);
$this->assertTrue($response->isAjax());
$response->setAjax(false);
$this->assertFalse($response->isAjax());
}
}