File: default_handler_009.phpt

package info (click to toggle)
php-doc 20241205~git.dfcbb86%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 70,956 kB
  • sloc: xml: 968,269; php: 23,883; javascript: 671; sh: 177; makefile: 37
file content (90 lines) | stat: -rw-r--r-- 1,973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
--TEST--
Default options handler 009 - Long options returned as array
--ARGS--
--format="xhtml" --noindex --forceindex --notoc --docbook="tests/options/default_handler_009.phpt" --output="tests/options/" --outputfilename="tests/options/default_handler_009.xml" --partial="bookId" --skip="idToSkip" --verbose=E_ALL --lang="en" --color=1 --highlighter="highlighter" --package="PHP" --css="some.css" --xinclude --ext=".html" --memoryindex --packagedir="tests/options/"
--SKIPIF--
<?php
if (file_exists(__DIR__ . "/../../phd.config.php")) {
    die("Skipped: existing phd.config.php file will overwrite command line options.");
}
?>
--FILE--
<?php
namespace phpdotnet\phd;

require_once __DIR__ . "/../setup.php";

$optionsParser = new Options_Parser(
    new Options_Handler(
      $config, 
      new Package_Generic_Factory, 
      new OutputHandler($config)
    )
);
$commandLineOptions = $optionsParser->getopt();

var_dump($commandLineOptions);
?>
--EXPECTF--
array(20) {
  ["output_format"]=>
  array(1) {
    [0]=>
    string(5) "xhtml"
  }
  ["no_index"]=>
  bool(true)
  ["force_index"]=>
  bool(true)
  ["no_toc"]=>
  bool(true)
  ["xml_root"]=>
  string(13) "tests/options"
  ["xml_file"]=>
  string(38) "tests/options/default_handler_009.phpt"
  ["output_dir"]=>
  string(14) "tests/options/"
  ["output_filename"]=>
  string(23) "default_handler_009.xml"
  ["render_ids"]=>
  array(1) {
    ["bookId"]=>
    bool(true)
  }
  ["skip_ids"]=>
  array(1) {
    ["idToSkip"]=>
    bool(true)
  }
  ["verbose"]=>
  int(%d)
  ["language"]=>
  string(2) "en"
  ["color_output"]=>
  bool(true)
  ["highlighter"]=>
  string(11) "highlighter"
  ["package"]=>
  array(1) {
    [0]=>
    string(3) "PHP"
  }
  ["css"]=>
  array(1) {
    [0]=>
    string(8) "some.css"
  }
  ["process_xincludes"]=>
  bool(true)
  ["ext"]=>
  string(5) ".html"
  ["memoryindex"]=>
  bool(true)
  ["package_dirs"]=>
  array(2) {
    [0]=>
    string(%d) "%s"
    [1]=>
    string(%d) "%s"
  }
}