diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-05-04 00:36:45 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-05-04 00:36:45 +0300 |
commit | 1061a85b5ee2f24328d0ba73c73eff87de44ae9c (patch) | |
tree | c141125d61e37c3e3db8e394825cb06b4118b6a8 /test/classes | |
parent | 87526f2b5dda6f9cd4cd426397664bdcb861cbf9 (diff) |
Extract the HTML from the Footer::getSelfLink method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test/classes')
-rw-r--r-- | test/classes/FooterTest.php | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/test/classes/FooterTest.php b/test/classes/FooterTest.php index ca21d15ea9..e2af27acfd 100644 --- a/test/classes/FooterTest.php +++ b/test/classes/FooterTest.php @@ -112,82 +112,6 @@ class FooterTest extends AbstractTestCase } /** - * Test for getSelfLink - */ - public function testGetSelfLink(): void - { - $GLOBALS['cfg']['TabsMode'] = 'text'; - $GLOBALS['cfg']['ServerDefault'] = 1; - $GLOBALS['db'] = 'db'; - $GLOBALS['table'] = 'table'; - - $this->assertEquals( - '<div id="selflink" class="print_ignore"><a href="index.php?db=db&' - . 'table=table&server=1&lang=en' - . '" title="Open new phpMyAdmin window" ' - . 'target="_blank" rel="noopener noreferrer">Open new phpMyAdmin window</a></div>', - $this->callFunction( - $this->object, - Footer::class, - 'getSelfLink', - [ - $this->object->getSelfUrl(), - ] - ) - ); - } - - /** - * Test for getSelfLink - */ - public function testGetSelfLinkWithImage(): void - { - $GLOBALS['cfg']['TabsMode'] = 'icons'; - $GLOBALS['cfg']['ServerDefault'] = 1; - - $this->assertEquals( - '<div id="selflink" class="print_ignore"><a href="' - . 'index.php?server=1&lang=en" title="Open new phpMyAdmin window" ' - . 'target="_blank" rel="noopener noreferrer"><img src="themes/dot.gif" title="Open new ' - . 'phpMyAdmin window" alt="Open new phpMyAdmin window" ' - . 'class="icon ic_window-new"></a></div>', - $this->callFunction( - $this->object, - Footer::class, - 'getSelfLink', - [ - $this->object->getSelfUrl(), - ] - ) - ); - } - - /** - * Test for getSelfLink - */ - public function testGetSelfLinkWithRoute(): void - { - $GLOBALS['route'] = '/test'; - $GLOBALS['cfg']['TabsMode'] = 'text'; - $GLOBALS['cfg']['ServerDefault'] = 1; - - $this->assertEquals( - '<div id="selflink" class="print_ignore"><a href="index.php?route=%2Ftest' - . '&server=1&lang=en' - . '" title="Open new phpMyAdmin window" ' - . 'target="_blank" rel="noopener noreferrer">Open new phpMyAdmin window</a></div>', - $this->callFunction( - $this->object, - Footer::class, - 'getSelfLink', - [ - $this->object->getSelfUrl(), - ] - ) - ); - } - - /** * Test for disable */ public function testDisable(): void |