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'); }
function testCreateWithLongNameOnly() { $opt = new lmbCliOption('foo'); $this->assertNull($opt->getShortName()); $this->assertEqual($opt->getName(), 'foo'); $this->assertEqual($opt->getLongName(), 'foo'); $this->assertEqual($opt->toString(), '--foo'); }