public function test_has() { $bag = new ParameterBag(array('foo' => 'bar')); $this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined'); $this->assertFalse($bag->has('unknown'), '->has() return false if a parameter is not defined'); }
/** * @deprecated Since 1.2, to be removed in 2.0. Use getParameters() instead * * @param string $name * * @return bool */ public function hasOption($name) { return $this->parameters->has($name); }