public/phpmyadmin/test/classes/Controllers/Server/ServerEnginesControllerTest.php
/**
     * Tests for _getHtmlForAllServerEngines() method
     *
     * @return void
     */
Tests for _getHtmlForAllServerEngines() method
@return void
Tests for _getHtmlForAllServerEngines () method @return void
public function testGetHtmlForAllServerEngines()
    {
        $class = new ReflectionClass('\PhpMyAdmin\Controllers\Server\ServerEnginesController');
        $method = $class->getMethod('_getHtmlForAllServerEngines');
        $method->setAccessible(true);
        $ctrl = new ServerEnginesController(
            $this->container->get('response'),
            $this->container->get('dbi')
        );
        $html = $method->invoke($ctrl);
        $this->assertContains(
            '<th>Storage Engine</th>',
            $html
        );
        $this->assertContains(
            '<th>Description</th>',
            $html
        );
        $this->assertContains(
            '<td>Federated MySQL storage engine</td>',
            $html
        );
        $this->assertContains(
            'FEDERATED',
            $html
        );
        $this->assertContains(
            'server_engines.php?engine=FEDERATED',
            $html
        );
        $this->assertContains(
            '<td>dummy comment</td>',
            $html
        );
        $this->assertContains(
            'dummy',
            $html
        );
        $this->assertContains(
            'server_engines.php?engine=dummy',
            $html
        );
    }
public function testGetHtmlForAllServerEngines ( ) { $ class = new ReflectionClass ( '\PhpMyAdmin\Controllers\Server\ServerEnginesController' ) ; $ method = $ class -> getMethod ( '_getHtmlForAllServerEngines' ) ; $ method -> setAccessible ( true ) ; $ ctrl = new ServerEnginesController ( $ this -> container -> get ( 'response' ) , $ this -> container -> get ( 'dbi' ) ) ; $ html = $ method -> invoke ( $ ctrl ) ; $ this -> assertContains ( '<th>Storage Engine</th>' , $ html ) ; $ this -> assertContains ( '<th>Description</th>' , $ html ) ; $ this -> assertContains ( '<td>Federated MySQL storage engine</td>' , $ html ) ; $ this -> assertContains ( 'FEDERATED' , $ html ) ; $ this -> assertContains ( 'server_engines.php?engine=FEDERATED' , $ html ) ; $ this -> assertContains ( '<td>dummy comment</td>' , $ html ) ; $ this -> assertContains ( 'dummy' , $ html ) ; $ this -> assertContains ( 'server_engines.php?engine=dummy' , $ html ) ; }
Tests for _getHtmlForAllServerEngines() method
 @return void
Tests for _getHtmlForAllServerEngines () method @return void
//validate 1: Item header //validate 2: FEDERATED //validate 3: dummy