PMA_VERSION, 'db' => 'pmadb', 'users' => 'users', 'usergroups' => 'usergroups' ); $GLOBALS['pmaThemeImage'] = 'image'; $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme'); $_SESSION['PMA_Theme'] = new Theme(); } /** * Tests PMA_getHtmlForUserGroupsTable() function when there are no user groups * * @return void * @group medium */ public function testGetHtmlForUserGroupsTableWithNoUserGroups() { $expectedQuery = "SELECT * FROM `pmadb`.`usergroups`" . " ORDER BY `usergroup` ASC"; $dbi = $this->getMockBuilder('PMA\libraries\DatabaseInterface') ->disableOriginalConstructor() ->getMock(); $dbi->expects($this->once()) ->method('tryQuery') ->with($expectedQuery) ->will($this->returnValue(true)); $dbi->expects($this->once()) ->method('numRows') ->withAnyParameters() ->will($this->returnValue(0)); $dbi->expects($this->once()) ->method('freeResult'); $GLOBALS['dbi'] = $dbi; $html = PMA_getHtmlForUserGroupsTable(); $this->assertNotContains( '