Beispiel #1
0
 /**
  * Tests Cmd::addOptionIfNotEmpty
  */
 public function testAddOptionIfEmptyAsValue()
 {
     $cmd = new Cmd('foo');
     $cmd->addOptionIfNotEmpty('-bar', '');
     $this->assertEquals('foo', (string) $cmd, 'option should not be added');
     $cmd->addOptionIfNotEmpty('-bar', 'fiz');
     $this->assertEquals('foo -bar=\'fiz\'', (string) $cmd, 'option should be added');
 }