예제 #1
0
 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');
 }
예제 #2
0
 /**
  * @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);
 }