getDi(); $api = new Guest(); $api->setDi($di); $getDi = $api->getDi(); $this->assertEquals($di, $getDi); } public function testSettings(): void { $modMock = $this->getMockBuilder('\\' . \FOSSBilling\Module::class)->disableOriginalConstructor()->getMock(); $modMock->expects($this->atLeastOnce())->method('getConfig')->willReturn([]); $api = new Guest(); $api->setMod($modMock); $result = $api->settings(); $this->assertIsArray($result); } public function testIsLate(): void { $serviceMock = $this->createMock(\Box\Mod\Cron\Service::class); $serviceMock->expects($this->atLeastOnce())->method('isLate')->willReturn(true); $api = new Guest(); $api->setService($serviceMock); $result = $api->is_late(); $this->assertIsBool($result); $this->assertTrue($result); } }