public/phpmyadmin/test/classes/Display/ResultsTest.php
/**
     * Test for navigation buttons
     *
     * @param string  $caption        iconic caption for button
     * @param string  $title          text for button
     * @param integer $pos            position for next query
     * @param string  $html_sql_query query ready for display
     *
     * @return void
     *
     * @dataProvider providerForTestGetTableNavigationButton
     */
Test for navigation buttons
@param string  $caption        iconic caption for button
@param string  $title          text for button
@param integer $pos            position for next query
@param string  $html_sql_query query ready for display

@return void


Test for navigation buttons @param string $caption iconic caption for button @param string $title text for button @param integer $pos position for next query @param string $html_sql_query query ready for display @return void
public function testGetTableNavigationButton(
        $caption, $title, $pos, $html_sql_query
    ) {
        $GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
        $_SESSION[' PMA_token '] = 'token';
        $actual = $this->_callPrivateFunction(
            '_getTableNavigationButton',
            array(&$caption, $title, $pos, $html_sql_query, true)
        );
        $this->assertContains(
            '<form action="sql.php" method="post">',
            $actual
        );
        $this->assertContains(
            'name="sql_query" value="SELECT * FROM `pma_bookmark` WHERE 1"',
            $actual
        );
        $this->assertContains(
            'name="pos" value="1"',
            $actual
        );
        $this->assertContains(
            'value="btn" title="Submit"',
            $actual
        );
    }
public function testGetTableNavigationButton ( $ caption , $ title , $ pos , $ html_sql_query ) { $ GLOBALS [ 'cfg' ] [ 'TableNavigationLinksMode' ] = 'icons' ; $ _SESSION [ ' PMA_token ' ] = 'token' ; $ actual = $ this -> _callPrivateFunction ( '_getTableNavigationButton' , array ( & $ caption , $ title , $ pos , $ html_sql_query , true ) ) ; $ this -> assertContains ( '<form action="sql.php" method="post">' , $ actual ) ; $ this -> assertContains ( 'name="sql_query" value="SELECT * FROM `pma_bookmark` WHERE 1"' , $ actual ) ; $ this -> assertContains ( 'name="pos" value="1"' , $ actual ) ; $ this -> assertContains ( 'value="btn" title="Submit"' , $ actual ) ; }
Test for navigation buttons
 @param string  $caption        iconic caption for button
 @param string  $title          text for button
 @param integer $pos            position for next query
 @param string  $html_sql_query query ready for display
Test for navigation buttons @param string $caption iconic caption for button @param string $title text for button @param integer $pos position for next query @param string $html_sql_query query ready for display