public/phpmyadmin/test/classes/ReplicationGuiTest.php
/**
     * Test for ReplicationGui::getHtmlForMasterReplication
     *
     * @return void
     * @group medium
     */
Test for ReplicationGui::getHtmlForMasterReplication
@return void
@group medium
Test for ReplicationGui :: getHtmlForMasterReplication @return void @group medium
public function testPMAGetHtmlForMasterReplication()
    {
        global $master_variables_alerts;
        global $master_variables_oks;
        global $strReplicationStatus_master;
        $master_variables_alerts = null;
        $master_variables_oks = null;
        $strReplicationStatus_master = null;
        $html = ReplicationGui::getHtmlForMasterReplication();
        $this->assertContains(
            '<legend>Master replication</legend>',
            $html
        );
        $this->assertContains(
            'This server is configured as master in a replication process.',
            $html
        );
        $this->assertContains(
            '<div id="replication_master_section"',
            $html
        );
        $this->assertContains(
            "Binlog_Do_DB",
            $html
        );
        $this->assertContains(
            "Binlog_Ignore_DB",
            $html
        );
        $this->assertContains(
            "master-bin.000030",
            $html
        );
        $this->assertContains(
            'replication_slaves_section',
            $html
        );
        $this->assertContains(
            '<th>Server ID</th>',
            $html
        );
        $this->assertContains(
            '<th>Host</th>',
            $html
        );
        $this->assertContains(
            '<td class="value">Server_id1</td>',
            $html
        );
        $this->assertContains(
            '<td class="value">Server_id2</td>',
            $html
        );
        $this->assertContains(
            '<td class="value">Host1</td>',
            $html
        );
        $this->assertContains(
            '<td class="value">Host2</td>',
            $html
        );
        $this->assertContains(
            'Only slaves started with the',
            $html
        );
        $this->assertContains(
            '<a href="server_replication.php',
            $html
        );
        $this->assertContains(
            'Add slave replication user',
            $html
        );
        $this->assertContains(
            '<div id="master_addslaveuser_gui">',
            $html
        );
    }
public function testPMAGetHtmlForMasterReplication ( ) { global $ master_variables_alerts ; global $ master_variables_oks ; global $ strReplicationStatus_master ; $ master_variables_alerts = null ; $ master_variables_oks = null ; $ strReplicationStatus_master = null ; $ html = ReplicationGui :: getHtmlForMasterReplication ( ) ; $ this -> assertContains ( '<legend>Master replication</legend>' , $ html ) ; $ this -> assertContains ( 'This server is configured as master in a replication process.' , $ html ) ; $ this -> assertContains ( '<div id="replication_master_section"' , $ html ) ; $ this -> assertContains ( " Binlog_Do_DB " , $ html ) ; $ this -> assertContains ( " Binlog_Ignore_DB " , $ html ) ; $ this -> assertContains ( " master-bin.000030 " , $ html ) ; $ this -> assertContains ( 'replication_slaves_section' , $ html ) ; $ this -> assertContains ( '<th>Server ID</th>' , $ html ) ; $ this -> assertContains ( '<th>Host</th>' , $ html ) ; $ this -> assertContains ( '<td class="value">Server_id1</td>' , $ html ) ; $ this -> assertContains ( '<td class="value">Server_id2</td>' , $ html ) ; $ this -> assertContains ( '<td class="value">Host1</td>' , $ html ) ; $ this -> assertContains ( '<td class="value">Host2</td>' , $ html ) ; $ this -> assertContains ( 'Only slaves started with the' , $ html ) ; $ this -> assertContains ( '<a href="server_replication.php' , $ html ) ; $ this -> assertContains ( 'Add slave replication user' , $ html ) ; $ this -> assertContains ( '<div id="master_addslaveuser_gui">' , $ html ) ; }
Test for ReplicationGui::getHtmlForMasterReplication
 @return void
 @group medium
Test for ReplicationGui :: getHtmlForMasterReplication @return void @group medium
//Call the test function //validate 1: Master replication //validate 2: ReplicationGui::getHtmlForReplicationStatusTable //$master_variables //$server_master_replication //validate 3: ReplicationGui::getHtmlForReplicationSlavesTable //slave host //Notice //validate 4: navigation URL //validate 5: 'Add replication slave user' form