Ejemplo n.º 1
0
 public function testGetBoolean()
 {
     $parameters = array('string_true' => 'true', 'string_false' => 'false');
     $bag = new ParameterBag($parameters);
     $this->assertTrue($bag->getBoolean('string_true'), '->getBoolean() gets the string true as boolean true');
     $this->assertFalse($bag->getBoolean('string_false'), '->getBoolean() gets the string false as boolean false');
     $this->assertFalse($bag->getBoolean('unknown'), '->getBoolean() returns false if a parameter is not defined');
 }