PhpSpec\ServiceContainer::get PHP Method

get() public method

Retrieves a service from the container
public get ( string $id ) : object
$id string
return object
    public function get($id);

Usage Example

 function it_creates_collaborator_maintainer_factory(ParameterValidator $parameterValidator)
 {
     $this->serviceContainer->get('ecomdev.phpspec.magento_di_adapter.parameter_validator')->willReturn($parameterValidator)->shouldBeCalled();
     $factory = $this->collaboratorMaintainerFactory();
     $factory->shouldImplement(\Closure::class);
     $factory($this->serviceContainer)->shouldImplement(CollaboratorMaintainer::class);
 }
All Usage Examples Of PhpSpec\ServiceContainer::get