Example #1
0
 /**
  * @When I try to get the service :serviceId out of the container
  */
 public function iTryToGetTheServiceOutOfTheContainer($serviceId)
 {
     try {
         $this->container->get($serviceId);
     } catch (\Exception $exception) {
         $this->lastExceptionFromContainer = $exception;
     }
 }
 /**
  * @expectedException \DirtyNeedle\Exception\CyclicDependencyInDiConfig
  * @expectedExceptionMessage Cyclic dependency found while trying to retrieve "@class-a" from container
  */
 public function testCanDetectCyclicDependencies()
 {
     $this->diIsConfiguredWith('cyclic_dependencies.php');
     $this->diContainer->get('class-a');
 }