diff --git a/test/libraries/PMA_operations_test.php b/test/libraries/PMA_operations_test.php new file mode 100644 index 0000000000..bea8d2d5ca --- /dev/null +++ b/test/libraries/PMA_operations_test.php @@ -0,0 +1,208 @@ +assertEquals( + PMA_getHtmlForDatabaseComment("pma"), + '
' + ); + } + + /** + * Test for PMA_getHtmlForRenameDatabase + */ + public function testPMA_getHtmlForRenameDatabase(){ + + $_REQUEST['db_collation'] = 'db1'; + $GLOBALS['cfg']['PropertiesIconic'] = true; + $this->assertEquals( + PMA_getHtmlForRenameDatabase("pma"), + '' + ); + } + + /** + * Test for PMA_getHtmlForDropDatabaseLink + */ + public function testPMA_getHtmlForDropDatabaseLink(){ + + $GLOBALS['cfg']['PropertiesIconic'] = true; + $this->assertEquals( + PMA_getHtmlForDropDatabaseLink("pma"), + '' + ); + } + + /** + * Test for PMA_getHtmlForCopyDatabase + */ + public function testPMA_getHtmlForCopyDatabase(){ + + $_REQUEST['db_collation'] = 'db1'; + $GLOBALS['cfg']['PropertiesIconic'] = true; + $this->assertEquals( + PMA_getHtmlForCopyDatabase("pma"), + '' + ); + } + + /** + * Test for PMA_getHtmlForChangeDatabaseCharset + */ + public function testPMA_getHtmlForChangeDatabaseCharset(){ + + $_REQUEST['db_collation'] = 'db1'; + $GLOBALS['cfg']['PropertiesIconic'] = true; + $this->assertEquals( + PMA_getHtmlForChangeDatabaseCharset("pma", "bookmark"), + ' +' + ); + } + + /** + * Test for PMA_getHtmlForExportRelationalSchemaView + */ + public function testPMA_getHtmlForExportRelationalSchemaView(){ + + $GLOBALS['cfg']['PropertiesIconic'] = true; + $this->assertEquals( + PMA_getHtmlForExportRelationalSchemaView("id=001&name=pma"), + '' + ); + } + + /** + * Test for PMA_getHtmlForOrderTheTable + */ + public function testPMA_getHtmlForOrderTheTable(){ + + $this->assertEquals( + PMA_getHtmlForOrderTheTable(array("column1", "column2")), + '' + ); + } + + /** + * Test for PMA_getHtmlForTableRow + */ + public function testPMA_getHtmlForTableRow(){ + + $this->assertEquals( + PMA_getHtmlForTableRow("name", "lable", "value"), + '
