public function test_set() { $bag = new ParameterBag(array()); $bag->set('foo', 'bar'); $this->assertEquals('bar', $bag->get('foo'), '->set() sets the value of parameter'); $bag->set('foo', 'baz'); $this->assertEquals('baz', $bag->get('foo'), '->set() overrides previously set parameter'); }
/** * @deprecated Since 1.2, to be removed in 2.0. Use getParameters() instead * * @param mixed $nonce * * @return RequestState */ public function setNonce($nonce) { $this->parameters->set('nonce', $nonce); return $this; }
/** * @deprecated Since 1.2, to be removed in 2.0. Use getParameters() instead * * @param string $name * @param mixed $value * * @return SsoState */ public function addOption($name, $value) { $this->parameters->set($name, $value); return $this; }