Пример #1
0
 /**
  * @depends testParse
  */
 public function testGetAll()
 {
     $params = new Parameters();
     $params->registerOption('help', 'h', Parameters::VALUE_NO);
     $params->registerOption('name', null, Parameters::VALUE_YES);
     $_SERVER['argv'] = array('file.php', '-h', '--name=Christian');
     $params->parse();
     $expected = array('help' => true, 'name' => 'Christian');
     $this->assertEquals($expected, $params->getAll());
 }