0
|
1 --TEST--
|
|
2 Test for Console_CommandLine::parse() method (user errors 3).
|
|
3 --SKIPIF--
|
|
4 <?php if(php_sapi_name()!='cli') echo 'skip'; ?>
|
|
5 --ARGS--
|
|
6 -s fooz foo bar
|
|
7 --FILE--
|
|
8 <?php
|
|
9
|
|
10 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tests.inc.php';
|
|
11
|
|
12 $parser = buildParser1();
|
|
13 try {
|
|
14 $result = $parser->parse();
|
|
15 } catch (Exception $exc) {
|
|
16 echo $exc->getMessage();
|
|
17 }
|
|
18
|
|
19 ?>
|
|
20 --EXPECT--
|
|
21 Option "string" must be one of the following: "foo", "bar", "baz" (got "fooz").
|