api = new Admin(); } public function testGetDi(): void { $di = $this->getDi(); $this->api->setDi($di); $getDi = $this->api->getDi(); $this->assertEquals($di, $getDi); } public function testGetPairs(): void { $serviceMock = $this->createMock(\Box\Mod\Page\Service::class); $serviceMock->expects($this->atLeastOnce()) ->method('getPairs') ->willReturn([]); $this->api->setService($serviceMock); $result = $this->api->get_pairs(); $this->assertIsArray($result); } }