Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2022-09-21 03:55:28 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2022-09-21 03:55:28 +0300
commitc2018c4c2195fc26f188e15ae56a0a30e385174f (patch)
treeb6b69cc36400a5f61c6c89883814a9b4dd8e0f69 /test
parent2076d5248044feff4b206dfb517370eb4a8bf9c1 (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.php26
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());
+ }
+}