You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-29 21:24:44 +03:00
Move /messages HTTP headers to the JavaScriptMessagesController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
@@ -8,9 +8,6 @@ use PhpMyAdmin\Controllers\JavaScriptMessagesController;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use function json_decode;
|
||||
use function ob_end_clean;
|
||||
use function ob_get_contents;
|
||||
use function ob_start;
|
||||
use function strlen;
|
||||
use function substr;
|
||||
|
||||
@@ -19,14 +16,14 @@ use function substr;
|
||||
*/
|
||||
class JavaScriptMessagesControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testIndex(): void
|
||||
{
|
||||
ob_start();
|
||||
(new JavaScriptMessagesController())();
|
||||
$actual = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$actual = $this->getActualOutputForAssertion();
|
||||
|
||||
$this->assertIsString($actual);
|
||||
$this->assertStringStartsWith('window.Messages = {', $actual);
|
||||
$this->assertStringEndsWith('};', $actual);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user