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6^^Χ@!KxcAOA8ȳQ*c*7Fڬ؀Т.7(G0NUOׄ]gFs:tWēq$F)w]p3ojK|G!s޳2.Q!=.ilEvEW8ˮbQ=^~y,H9vA#dt19tnO#wU>/(S{%MdqQ$a,i/gL#MX$*r.)Wa@O]%s{~,~.|U:IQRs F./LjPz(" %&]1) 3Nᾣ1#ɎzxwYolTTsb5J#<>	IRoOP6u{2xW}3Nᾣ1#ɎzF	~W(Ug:`ix$t;gf 6soY{ť6EX6Zŗ%ϧH8/7>u@pQk?.:Q]Fg 1WRP+?͕>BNԥZth Ft^L=pOvh8<xR([(mwtXSH9]>0'T34
!9o"
M/^b*ΣSPKOfG@6f>i_%f)g[O8!TX,7⭝/Q9M%r<ۍDx{
y X6 HĒ?>~CF5~
?pdwwΏ@$C3M}wC_;^?;jUcY0X񌥬؛2xc%UfIL̛b>q-j{M4'lEǬJZL
!9ħNJEyS
䋢>`!8<AV?2.݈y&kE{G굁[Ϥd|ԅRA=,Y>=1& !~/VQd"R35:Fن&yja&80%35HFG(+vfҡc-o07r_|@}(>VCS%nVb|uEWyPȳ{a8zyҳZsG?x
x~AaQq8LN16(@0%"`n 8"KU]]u<6bHa ߻휐@}(>VCS%nVbP9\f8zyҳZsG?x
x~AaQq8LN16(@0%"`n 8"KU]]wg]sC e&l? %'+
Sgٜ%SO=0"X%lv .'$vt~˖=y@npOO]%ݓaa,»4N0xg1]t0VwYm݀;T6emA.?Rc?a>ϧr۵Op@ѸFS?.Kx F͕>BNԥֱx&dW|	u7r35:Fن&yja&80%35HFG?`dw˛0_,xqk}CKk͐aCŶ#o{fΦYv 
8[I98ɗد?;	D%w ServerStatusData();
    }

    /**
     * Test for PMA_getHtmlForServerStatus
     *
     * @return void
     * @group medium
     */
    public function testPMAGetHtmlForServerStatus()
    {
        //parameters
        $bytes_received = 100;
        $bytes_sent = 200;
        $max_used_conn = 500;
        $aborted_conn = 200;
        $conn = 1000;
        $this->ServerStatusData->status['Uptime'] = 36000;
        $this->ServerStatusData->status['Bytes_received'] = $bytes_received;
        $this->ServerStatusData->status['Bytes_sent'] = $bytes_sent;
        $this->ServerStatusData->status['Max_used_connections'] = $max_used_conn;
        $this->ServerStatusData->status['Aborted_connects'] = $aborted_conn;
        $this->ServerStatusData->status['Connections'] = $conn;

        //Call the test function
        $html = PMA_getHtmlForServerStatus($this->ServerStatusData);

        //validate 1: PMA_getHtmlForServerStateGeneralInfo
        //traffic: $bytes_received + $bytes_sent
        $traffic = $bytes_received + $bytes_sent;
        $traffic_html = 'Network traffic since startup: ' . $traffic . ' B';
        $this->assertContains(
            $traffic_html,
            $html
        );
        //updatetime
        $upTime_html = 'This MySQL server has been running for '
            . '0 days, 10 hours, 0 minutes and 0 seconds';
        $this->assertContains(
            $upTime_html,
            $html
        );
        //master state
        $master_html = 'This MySQL server works as <b>master</b>';
        $this->assertContains(
            $master_html,
            $html
        );

        //validate 2: PMA_getHtmlForServerStateTraffic
        $traffic_html = '<table id="serverstatustraffic" class="data noclick">';
        $this->assertContains(
            $traffic_html,
            $html
        );
        //traffic hint
        $traffic_html = 'On a busy server, the byte counters may overrun';
        $this->assertContains(
            $traffic_html,
            $html
        );
        //$bytes_received
        $this->assertContains(
            '<td class="value">' . $bytes_received . ' B',
            $html
        );
        //$bytes_sent
        $this->assertContains(
            '<td class="value">' . $bytes_sent . ' B',
            $html
        );

        //validate 3: PMA_getHtmlForServerStateConnections
        $this->assertContains(
            '<th>Connections</th>',
            $html
        );
        $this->assertContains(
            '<th>&oslash; per hour</th>',
            $html
        );
        $this->assertContains(
            '<table id="serverstatusconnections" class="data noclick">',
            $html
        );
        $this->assertContains(
            '<th class="name">Max. concurrent connections</th>',
            $html
        );
        //Max_used_connections
        $this->assertContains(
            '<td class="value">' . $max_used_conn,
            $html
        );
        $this->assertContains(
            '<th class="name">Failed attempts</th>',
            $html
        );
        //Aborted_connects
        $this->assertContains(
            '<td class="value">' . $aborted_conn,
            $html
        );
        $this->assertContains(
            '<th class="name">Aborted</th>',
            $html
        );

        $GLOBALS['replication_info']['master']['status'] = true;
        $GLOBALS['replication_info']['slave']['status'] = true;
        $this->ServerStatusData->status['Connections'] = 0;
        $html = PMA_getHtmlForServerStatus($this->ServerStatusData);

        $this->assertContains(
            'This MySQL server works as <b>master</b> and <b>slave</b>',
            $html
        );

        $GLOBALS['replication_info']['master']['status'] = false;
        $GLOBALS['replication_info']['slave']['status'] = true;
        $html = PMA_getHtmlForServerStatus($this->ServerStatusData);

        $this->assertContains(
            'This MySQL server works as <b>slave</b>',
            $html
        );
    }
}
