コード例 #1
0
 function testCreateWithBothNames()
 {
     $opt = new lmbCliOption('f', 'foo');
     $this->assertEqual($opt->getName(), 'foo');
     $this->assertEqual($opt->getLongName(), 'foo');
     $this->assertEqual($opt->toString(), '-f|--foo');
 }
コード例 #2
0
 function testCreateWithBothNames()
 {
     $opt = new lmbCliOption('f', 'foo', lmbCliOption::VALUE_REQ);
     $this->assertEqual($opt->getShortName(), 'f');
     $this->assertEqual($opt->getLongName(), 'foo');
     $this->assertEqual($opt->getValueMode(), lmbCliOption::VALUE_REQ);
     $this->assertEqual($opt->toString(), '-f|--foo');
 }