From eb0ad35e683ee9ad6822f95749cf27d27c0ac2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 18 Sep 2012 11:59:45 +0200 Subject: [PATCH] Simplify code and improve coding style --- test/libraries/PMA_operations_test.php | 79 +++++++++++++++++--------- 1 file changed, 52 insertions(+), 27 deletions(-) diff --git a/test/libraries/PMA_operations_test.php b/test/libraries/PMA_operations_test.php index 483cadef30..b67d4feab5 100644 --- a/test/libraries/PMA_operations_test.php +++ b/test/libraries/PMA_operations_test.php @@ -1,7 +1,7 @@ true, ); $GLOBALS['server'] = 1; - - if (! function_exists('PMA_generateCharsetDropdownBox')) { - function PMA_generateCharsetDropdownBox() - { - } - } - if (! defined('PMA_CSDROPDOWN_CHARSET')) { - define('PMA_CSDROPDOWN_CHARSET', ''); - } - if (! defined('PMA_CSDROPDOWN_COLLATION')) { - define('PMA_CSDROPDOWN_COLLATION', ''); - } } /** * Test for PMA_getHtmlForDatabaseComment + * + * @return void */ - public function testPMA_getHtmlForDatabaseComment() + public function testGetHtmlForDatabaseComment() { $this->assertRegExp( @@ -63,8 +64,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForRenameDatabase + * + * @return void */ - public function testPMA_getHtmlForRenameDatabase() + public function testGetHtmlForRenameDatabase() { $_REQUEST['db_collation'] = 'db1'; @@ -76,8 +79,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForDropDatabaseLink + * + * @return void */ - public function testPMA_getHtmlForDropDatabaseLink() + public function testGetHtmlForDropDatabaseLink() { $this->assertRegExp( @@ -88,8 +93,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForCopyDatabase + * + * @return void */ - public function testPMA_getHtmlForCopyDatabase() + public function testGetHtmlForCopyDatabase() { $_REQUEST['db_collation'] = 'db1'; @@ -101,8 +108,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForChangeDatabaseCharset + * + * @return void */ - public function testPMA_getHtmlForChangeDatabaseCharset() + public function testGetHtmlForChangeDatabaseCharset() { $_REQUEST['db_collation'] = 'db1'; @@ -114,8 +123,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForExportRelationalSchemaView + * + * @return void */ - public function testPMA_getHtmlForExportRelationalSchemaView() + public function testGetHtmlForExportRelationalSchemaView() { $this->assertRegExp( @@ -126,8 +137,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForOrderTheTable + * + * @return void */ - public function testPMA_getHtmlForOrderTheTable() + public function testGetHtmlForOrderTheTable() { $this->assertRegExp( @@ -140,8 +153,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForTableRow + * + * @return void */ - public function testPMA_getHtmlForTableRow() + public function testGetHtmlForTableRow() { $this->assertEquals( @@ -152,8 +167,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getMaintainActionlink + * + * @return void */ - public function testPMA_getMaintainActionlink() + public function testGetMaintainActionlink() { $this->assertRegExp( @@ -169,8 +186,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForDeleteDataOrTable + * + * @return void */ - public function testPMA_getHtmlForDeleteDataOrTable() + public function testGetHtmlForDeleteDataOrTable() { $this->assertRegExp( @@ -183,8 +202,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getDeleteDataOrTablelink + * + * @return void */ - public function testPMA_getDeleteDataOrTablelink() + public function testGetDeleteDataOrTablelink() { $this->assertRegExp( @@ -200,8 +221,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForPartitionMaintenance + * + * @return void */ - public function testPMA_getHtmlForPartitionMaintenance() + public function testGetHtmlForPartitionMaintenance() { $this->assertRegExp( @@ -215,8 +238,10 @@ class PMA_operations_test extends PHPUnit_Framework_TestCase /** * Test for PMA_getHtmlForReferentialIntegrityCheck + * + * @return void */ - public function testPMA_getHtmlForReferentialIntegrityCheck() + public function testGetHtmlForReferentialIntegrityCheck() { $this->assertRegExp(