/** * Tests Container::get() with an exception due to missing parameter on the second call. * * @covers ::get() * @covers ::expandArguments() * * @expectedException \RuntimeException */ public function test_get_notFound_parameterWithExceptionOnSecondCall() { $service = $this->container->get('service_parameter_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE); $this->assertNull($service->getSomeParameter(), 'Some parameter is NULL.'); // Reset the service. $this->container->set('service_parameter_not_exists', NULL); $this->container->get('service_parameter_not_exists'); }