'plugin_name1', 'PLUGIN_TYPE' => 'plugin_type1', 'PLUGIN_VERSION' => 'plugin_version1', 'PLUGIN_AUTHOR' => 'plugin_author1', 'PLUGIN_LICENSE' => 'plugin_license1', 'PLUGIN_DESCRIPTION' => 'plugin_description1', 'PLUGIN_STATUS' => 'ACTIVE', ]; $dbi = $this->getMockBuilder(DatabaseInterface::class) ->disableOriginalConstructor() ->getMock(); $dbi->expects($this->once()) ->method('query') ->will($this->returnValue(true)); $dbi->expects($this->exactly(2)) ->method('fetchAssoc') ->will($this->onConsecutiveCalls($row, null)); $dbi->expects($this->once()) ->method('freeResult') ->will($this->returnValue(true)); $response = new ResponseRenderer(); $controller = new PluginsController($response, new Template(), new Plugins($dbi), $GLOBALS['dbi']); $this->dummyDbi->addSelectDb('mysql'); $controller(); $this->assertAllSelectsConsumed(); $actual = $response->getHTMLResult(); //validate 1:Items $this->assertStringContainsString( '