diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-09-21 03:55:28 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-09-21 03:55:28 +0300 |
commit | c2018c4c2195fc26f188e15ae56a0a30e385174f (patch) | |
tree | b6b69cc36400a5f61c6c89883814a9b4dd8e0f69 /test | |
parent | 2076d5248044feff4b206dfb517370eb4a8bf9c1 (diff) |
Extract /console/bookmark/refresh action from ImportController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test')
-rw-r--r-- | test/classes/Controllers/Console/Bookmark/RefreshControllerTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/classes/Controllers/Console/Bookmark/RefreshControllerTest.php b/test/classes/Controllers/Console/Bookmark/RefreshControllerTest.php new file mode 100644 index 0000000000..11f3eabafb --- /dev/null +++ b/test/classes/Controllers/Console/Bookmark/RefreshControllerTest.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +namespace PhpMyAdmin\Tests\Controllers\Console\Bookmark; + +use PhpMyAdmin\Controllers\Console\Bookmark\RefreshController; +use PhpMyAdmin\Http\ServerRequest; +use PhpMyAdmin\Template; +use PhpMyAdmin\Tests\AbstractTestCase; +use PhpMyAdmin\Tests\Stubs\ResponseRenderer; + +/** + * @covers \PhpMyAdmin\Controllers\Console\Bookmark\RefreshController + */ +class RefreshControllerTest extends AbstractTestCase +{ + public function testDefault(): void + { + $GLOBALS['dbi'] = $this->createDatabaseInterface(); + $response = new ResponseRenderer(); + $controller = new RefreshController($response, new Template()); + $controller($this->createStub(ServerRequest::class)); + $this->assertSame(['console_message_bookmark' => ''], $response->getJSONResult()); + } +} |