PEAR2_Console_CommandLine-0.2.0PEAR2_Console_CommandLine-0.2.0/test/pear2.php.net/PEAR2_Console_CommandLine/console_commandline_parse_20.phpt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Test for PEAR2\Console\CommandLine::fromXmlFile() method.
--SKIPIF--
<?php if(php_sapi_name()!='cli') echo 'skip'; ?>
--ARGS--
--list-choice
--FILE--
<?php

require_once __DIR__ . DIRECTORY_SEPARATOR . 'tests.inc.php';

$parser = PEAR2\Console\CommandLine::fromXmlFile(__DIR__ . DIRECTORY_SEPARATOR . 'test.xml');
$parser->parse();

?>
--EXPECTF--
Valid choices are: ham, spam
EOF