function it_sets_the_request_attribute_from_the_current_time(GetResponseEvent $event, ParameterBagInterface $attributesParameterBag) { $request = new Request([], [], [], [], [], []); $request->attributes = $attributesParameterBag->getWrappedObject(); $event->getRequest()->willReturn($request); $attributesParameterBag->set('_tolerance_request_time', Argument::type('float'))->shouldBeCalled(); $this->onRequest($event); }
/** * Sets a parameter. * * @param string $name The parameter name * @param mixed $value The parameter value */ public function setParameter($name, $value) { $this->parameterBag->set($name, $value); }
/** * Sets a config. * * @param string $name The config name * @param mixed $value The config value */ public function set($key, $value) { $this->parameterBag->set($key, $value); }