PhpBench\Tests\Unit\Registry\RegistryTest::testRegisterRetrieveService PHP Method

testRegisterRetrieveService() public method

It should register a service It should retrieve a service It should retrieve a service from the container only once.
    public function testRegisterRetrieveService()
    {
        $this->container->get('foo')->willReturn($this->service1->reveal())->shouldBeCalledTimes(1);
        $this->registry->registerService('bar', 'foo');
        $this->registry->getService('bar');
        $this->registry->getService('bar');
    }