validate() public method

public validate ( $value )
Esempio n. 1
0
 public function testOptionWithoutValidator()
 {
     $opt = new Option('scope');
     $ret = $opt->validate('public');
     $this->assertTrue($ret[0]);
     $ret = $opt->validate('private');
     $this->assertTrue($ret[0]);
     $ret = $opt->validate('foo');
     $this->assertTrue($ret[0]);
     $this->assertEquals('--scope', $opt->renderReadableSpec(true));
 }