app = new Application(); $this->container = $this->app->getContainer(); } public function testContainerAppName(): void { $this->app = new Application(); $this->assertEquals('settings', $this->container->getAppName()); } public function dataContainerQuery() { return [ [AdminSettingsController::class, Controller::class], [AppSettingsController::class, Controller::class], [AuthSettingsController::class, Controller::class], [CheckSetupController::class, Controller::class], [LogSettingsController::class, Controller::class], [MailSettingsController::class, Controller::class], [UsersController::class, Controller::class], [SubadminMiddleware::class, Middleware::class], ]; } /** * @dataProvider dataContainerQuery * @param string $service * @param string $expected */ public function testContainerQuery($service, $expected): void { $this->assertTrue($this->container->query($service) instanceof $expected); } }