DbSearchTest::setUp PHP Метод

setUp() защищенный Метод

This method is called before a test is executed.
protected setUp ( ) : void
Результат void
    protected function setUp()
    {
        $this->object = new DbSearch('pma_test');
        $GLOBALS['server'] = 0;
        $GLOBALS['db'] = 'pma';
        $GLOBALS['collation_connection'] = 'utf-8';
        //mock DBI
        $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
        $dbi->expects($this->any())->method('getColumns')->with('pma', 'table1')->will($this->returnValue(array()));
        $dbi->expects($this->any())->method('escapeString')->will($this->returnArgument(0));
        $GLOBALS['dbi'] = $dbi;
    }