app = new App('theming'); $this->container = $this->app->getContainer(); } public function queryData() { return [ [IL10N::class], // lib/ [Capabilities::class], [Capabilities::class, ICapability::class], [ThemingDefaults::class], [ThemingDefaults::class, \OC_Defaults::class], [Util::class], // Controller [ThemingController::class, ThemingController::class], // Settings [Admin::class], [Admin::class, ISettings::class], [PersonalSection::class], [PersonalSection::class, IIconSection::class], ]; } /** * @dataProvider queryData * @param string $service * @param string $expected */ public function testContainerQuery($service, $expected = null) { if ($expected === null) { $expected = $service; } $this->assertTrue($this->container->query($service) instanceof $expected); } }