public function testInstansiation() { $service = new Service(); $service->register($this->container, $this->hateoasConfig); $hateoasService = $this->container->get(Config::getServiceName()); $this->assertInstanceOf('\\Hateoas\\Hateoas', $hateoasService); }
public function testInstantiation() { $this->assertTrue($this->app->getContainer()->isSingleton(Service\Hateoas\Config::getServiceName())); $this->assertTrue($this->app->getContainer()->isSingleton(Service\Logger\Config::getServiceName())); $this->assertEquals('phprest-test', $this->app->getContainer()->get(Application::CONTAINER_ID_VENDOR)); $this->assertEquals(1, $this->app->getContainer()->get(Application::CONTAINER_ID_API_VERSION)); $this->assertTrue($this->app->getContainer()->get(Application::CONTAINER_ID_DEBUG)); $this->assertInstanceOf('\\Phprest\\Router\\RouteCollection', $this->app->getContainer()->get(Application::CONTAINER_ID_ROUTER)); }
/** * @return \Hateoas\Hateoas * * @codeCoverageIgnore */ protected function serviceHateoas() { return $this->getContainer()->get(Service\Hateoas\Config::getServiceName()); }