Ejemplo n.º 1
0
 /**
  * Test a command line scheme created with {@link Cli::schema()}.
  */
 public function testSchema()
 {
     $cli = new Cli();
     $cli->schema(['hello', 'b:enabled?' => 'Is it?', 'i:count:c?' => 'How many?']);
     $parsed = $cli->parse(['script', '--hello=foo', '--enabled', '--count=123']);
     $this->assertEquals(['hello' => 'foo', 'enabled' => true, 'count' => 123], $parsed->getOpts());
 }