Наследование: implements Phprest\Service\Configurable
Пример #1
0
 public function testInstansiation()
 {
     $service = new Service();
     $service->register($this->container, $this->hateoasConfig);
     $hateoasService = $this->container->get(Config::getServiceName());
     $this->assertInstanceOf('\\Hateoas\\Hateoas', $hateoasService);
 }
Пример #2
0
 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));
 }
Пример #3
0
 /**
  * @return \Hateoas\Hateoas
  *
  * @codeCoverageIgnore
  */
 protected function serviceHateoas()
 {
     return $this->getContainer()->get(Service\Hateoas\Config::getServiceName());
 }