diff --git a/phpdotnet/phd/Index.php b/phpdotnet/phd/Index.php index 0181067a..e0d119d3 100644 --- a/phpdotnet/phd/Index.php +++ b/phpdotnet/phd/Index.php @@ -527,6 +527,3 @@ public function setMembership($membership) { } } - - - diff --git a/tests/xhtml/TestChunkedXHTML.php b/phpdotnet/phd/TestGenericChunkedXHTML.php similarity index 92% rename from tests/xhtml/TestChunkedXHTML.php rename to phpdotnet/phd/TestGenericChunkedXHTML.php index 21badb29..212af20a 100644 --- a/tests/xhtml/TestChunkedXHTML.php +++ b/phpdotnet/phd/TestGenericChunkedXHTML.php @@ -1,7 +1,7 @@ index && $this->index::requireIndexing()) { + if (!file_exists($this->config->output_dir())) { + mkdir($this->config->output_dir(), 0755); + } + $this->attach($this->index); + $this->reader->open($this->config->xml_file()); + $this->execute($this->reader); + $this->detach($this->index); + } + + if ($this->format !== null) { + $this->attach($this->format); + $this->reader->open($this->config->xml_file()); + $this->execute($this->reader); + } + } + + public function getIndex(): ?Index { + return $this->index; + } +} diff --git a/tests/TestRender.php b/tests/TestRender.php deleted file mode 100644 index f7217bf2..00000000 --- a/tests/TestRender.php +++ /dev/null @@ -1,64 +0,0 @@ -format = $format; - - if ($indices) { - foreach ($indices as $index) { - $this->format->SQLiteIndex( - null, // $context, - null, // $index, - $index["docbook_id"] ?? "", // $id, - $index["filename"] ?? "", // $filename, - $index["parent_id"] ?? "", // $parent, - $index["sdesc"] ?? "", // $sdesc, - $index["ldesc"] ?? "", // $ldesc, - $index["element"] ?? "", // $element, - $index["previous"] ?? "", // $previous, - $index["next"] ?? "", // $next, - $index["chunk"] ?? 0, // $chunk - ); - } - } - } - - $this->config = $config; - - if ($index !== null) { - $this->index = $index; - } - } - - public function run() { - $reader = new Reader(); - - if ($this->index !== null && $this->index::requireIndexing()) { - $this->attach($this->index); - $reader->open($this->config::xml_file()); - $this->execute($reader); - $this->detach($this->index); - } - - if ($this->format !== null) { - $this->attach($this->format); - $reader->open($this->config::xml_file()); - $this->execute($reader); - } - } -} - - diff --git a/tests/xhtml/001.phpt b/tests/package/generic/001.phpt similarity index 66% rename from tests/xhtml/001.phpt rename to tests/package/generic/001.phpt index b5221d4f..0f80b0c6 100644 --- a/tests/xhtml/001.phpt +++ b/tests/package/generic/001.phpt @@ -4,27 +4,14 @@ CALS Table rendering true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestGenericChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/xhtml/002.phpt b/tests/package/generic/002.phpt similarity index 86% rename from tests/xhtml/002.phpt rename to tests/package/generic/002.phpt index 04953b3e..b00e65d1 100644 --- a/tests/xhtml/002.phpt +++ b/tests/package/generic/002.phpt @@ -4,27 +4,14 @@ CALS Table rendering#002 true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestGenericChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/xhtml/003.phpt b/tests/package/generic/003.phpt similarity index 90% rename from tests/xhtml/003.phpt rename to tests/package/generic/003.phpt index ea548ee5..512c1e3e 100644 --- a/tests/xhtml/003.phpt +++ b/tests/package/generic/003.phpt @@ -4,27 +4,14 @@ CALS Table rendering#003 true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestGenericChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/xhtml/data/001-1.xml b/tests/package/generic/data/001-1.xml similarity index 100% rename from tests/xhtml/data/001-1.xml rename to tests/package/generic/data/001-1.xml diff --git a/tests/xhtml/data/002.xml b/tests/package/generic/data/002.xml similarity index 100% rename from tests/xhtml/data/002.xml rename to tests/package/generic/data/002.xml diff --git a/tests/xhtml/data/003.xml b/tests/package/generic/data/003.xml similarity index 100% rename from tests/xhtml/data/003.xml rename to tests/package/generic/data/003.xml diff --git a/tests/xhtml/data/simplelist.xml b/tests/package/generic/data/simplelist.xml similarity index 100% rename from tests/xhtml/data/simplelist.xml rename to tests/package/generic/data/simplelist.xml diff --git a/tests/xhtml/data/whitespace_formatting_001.xml b/tests/package/generic/data/whitespace_formatting_001.xml similarity index 100% rename from tests/xhtml/data/whitespace_formatting_001.xml rename to tests/package/generic/data/whitespace_formatting_001.xml diff --git a/tests/xhtml/simplelist_001.phpt b/tests/package/generic/simplelist_001.phpt similarity index 68% rename from tests/xhtml/simplelist_001.phpt rename to tests/package/generic/simplelist_001.phpt index 7d8f1166..5be5acdb 100644 --- a/tests/xhtml/simplelist_001.phpt +++ b/tests/package/generic/simplelist_001.phpt @@ -4,27 +4,14 @@ Simplelist rendering 001 - Types and columns true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); +Config::init(["xml_file" => $xml_file]); -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +$format = new TestGenericChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/xhtml/whitespace_formatting_001.phpt b/tests/package/generic/whitespace_formatting_001.phpt similarity index 81% rename from tests/xhtml/whitespace_formatting_001.phpt rename to tests/package/generic/whitespace_formatting_001.phpt index 0211b196..8c698aca 100644 --- a/tests/xhtml/whitespace_formatting_001.phpt +++ b/tests/package/generic/whitespace_formatting_001.phpt @@ -4,27 +4,14 @@ Whitespace formatting 001 true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); +Config::init(["xml_file" => $xml_file]); -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +$format = new TestGenericChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/bug49101-1.phpt b/tests/package/php/bug49101-1.phpt similarity index 66% rename from tests/php/bug49101-1.phpt rename to tests/package/php/bug49101-1.phpt index 3497f818..b8330949 100644 --- a/tests/php/bug49101-1.phpt +++ b/tests/package/php/bug49101-1.phpt @@ -4,27 +4,14 @@ Bug #49101-1 - Thick border again true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __DIR__ . "/../../phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); +Config::init(["xml_file" => $xml_file]); -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> @@ -88,3 +75,5 @@ Content: + + diff --git a/tests/php/bug49101-2.phpt b/tests/package/php/bug49101-2.phpt similarity index 71% rename from tests/php/bug49101-2.phpt rename to tests/package/php/bug49101-2.phpt index 1bbc5394..b44dd02c 100644 --- a/tests/php/bug49101-2.phpt +++ b/tests/package/php/bug49101-2.phpt @@ -4,27 +4,14 @@ Bug #49101-2 - Thick border again - Big XHTML true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __DIR__ . "/../../phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestBigXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestPHPBigXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/bug49102-1.phpt b/tests/package/php/bug49102-1.phpt similarity index 84% rename from tests/php/bug49102-1.phpt rename to tests/package/php/bug49102-1.phpt index f95100d0..8b1f032d 100644 --- a/tests/php/bug49102-1.phpt +++ b/tests/package/php/bug49102-1.phpt @@ -4,28 +4,14 @@ Bug #49102 - Class reference pages don't normalize the methodnames in PhD trunk/ true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - 'language' => 'en', - "lang_dir" => __DIR__ . "/../../phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/package/php/bug_doc-en_GH-3179.phpt b/tests/package/php/bug_doc-en_GH-3179.phpt new file mode 100644 index 00000000..68cdef2a --- /dev/null +++ b/tests/package/php/bug_doc-en_GH-3179.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug doc-en GH-3197 +--FILE-- + $xml_file]); + +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); + +$render->run(); +?> +--EXPECT-- +Filename: bug_doc-en_GH-3179.html +Content: +
+
+
method_name(): void
+ +
+ +
diff --git a/tests/php/constant_links_001.phpt b/tests/package/php/constant_links_001.phpt similarity index 62% rename from tests/php/constant_links_001.phpt rename to tests/package/php/constant_links_001.phpt index 300886eb..6e40f8b9 100644 --- a/tests/php/constant_links_001.phpt +++ b/tests/package/php/constant_links_001.phpt @@ -4,20 +4,11 @@ Constant links 001 true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); +Config::init(["xml_file" => $xml_file]); $indices = [ [ @@ -30,13 +21,26 @@ $indices = [ ], ]; -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config, $indices); +$format = new TestPHPChunkedXHTML; -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); +foreach ($indices as $index) { + $format->SQLiteIndex( + null, // $context, + null, // $index, + $index["docbook_id"] ?? "", // $id, + $index["filename"] ?? "", // $filename, + $index["parent_id"] ?? "", // $parent, + $index["sdesc"] ?? "", // $sdesc, + $index["ldesc"] ?? "", // $ldesc, + $index["element"] ?? "", // $element, + $index["previous"] ?? "", // $previous, + $index["next"] ?? "", // $next, + $index["chunk"] ?? 0, // $chunk + ); } +$render = new TestRender(new Reader, new Config, $format); + $render->run(); ?> --EXPECTF-- diff --git a/tests/php/data/acronyms.xml b/tests/package/php/data/acronyms.xml similarity index 100% rename from tests/php/data/acronyms.xml rename to tests/package/php/data/acronyms.xml diff --git a/tests/php/data/bug49101-1.xml b/tests/package/php/data/bug49101-1.xml similarity index 100% rename from tests/php/data/bug49101-1.xml rename to tests/package/php/data/bug49101-1.xml diff --git a/tests/php/data/bug49102-1.xml b/tests/package/php/data/bug49102-1.xml similarity index 100% rename from tests/php/data/bug49102-1.xml rename to tests/package/php/data/bug49102-1.xml diff --git a/tests/php/data/bug_doc-en_GH-3197.xml b/tests/package/php/data/bug_doc-en_GH-3197.xml similarity index 100% rename from tests/php/data/bug_doc-en_GH-3197.xml rename to tests/package/php/data/bug_doc-en_GH-3197.xml diff --git a/tests/php/data/constant_links.xml b/tests/package/php/data/constant_links.xml similarity index 100% rename from tests/php/data/constant_links.xml rename to tests/package/php/data/constant_links.xml diff --git a/tests/php/data/faq001.xml b/tests/package/php/data/faq001.xml similarity index 100% rename from tests/php/data/faq001.xml rename to tests/package/php/data/faq001.xml diff --git a/tests/php/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml b/tests/package/php/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml similarity index 100% rename from tests/php/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml rename to tests/package/php/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml diff --git a/tests/php/data/type_rendering_methodsynopsis_parameters.xml b/tests/package/php/data/type_rendering_methodsynopsis_parameters.xml similarity index 100% rename from tests/php/data/type_rendering_methodsynopsis_parameters.xml rename to tests/package/php/data/type_rendering_methodsynopsis_parameters.xml diff --git a/tests/php/data/type_rendering_methodsynopsis_return_types.xml b/tests/package/php/data/type_rendering_methodsynopsis_return_types.xml similarity index 100% rename from tests/php/data/type_rendering_methodsynopsis_return_types.xml rename to tests/package/php/data/type_rendering_methodsynopsis_return_types.xml diff --git a/tests/php/data/variablelist_rendering_001.xml b/tests/package/php/data/variablelist_rendering_001.xml similarity index 100% rename from tests/php/data/variablelist_rendering_001.xml rename to tests/package/php/data/variablelist_rendering_001.xml diff --git a/tests/php/data/version.xml b/tests/package/php/data/version.xml similarity index 100% rename from tests/php/data/version.xml rename to tests/package/php/data/version.xml diff --git a/tests/php/faq001.phpt b/tests/package/php/faq001.phpt similarity index 73% rename from tests/php/faq001.phpt rename to tests/package/php/faq001.phpt index c729d2e1..5f221630 100644 --- a/tests/php/faq001.phpt +++ b/tests/package/php/faq001.phpt @@ -4,27 +4,14 @@ Testing a simple FAQ false, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __DIR__ . "/../../phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); +Config::init(["xml_file" => $xml_file]); -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/type_rendering_001.phpt b/tests/package/php/type_rendering_001.phpt similarity index 83% rename from tests/php/type_rendering_001.phpt rename to tests/package/php/type_rendering_001.phpt index 2e223a0b..ed29ea18 100644 --- a/tests/php/type_rendering_001.phpt +++ b/tests/package/php/type_rendering_001.phpt @@ -4,27 +4,14 @@ Type rendering 001 - Methodsynopsis return types true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/type_rendering_002.phpt b/tests/package/php/type_rendering_002.phpt similarity index 88% rename from tests/php/type_rendering_002.phpt rename to tests/package/php/type_rendering_002.phpt index 513f7f43..d1a51531 100644 --- a/tests/php/type_rendering_002.phpt +++ b/tests/package/php/type_rendering_002.phpt @@ -4,27 +4,14 @@ Type rendering 002 - Methodsynopsis parameters and parameter types true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/type_rendering_003.phpt b/tests/package/php/type_rendering_003.phpt similarity index 90% rename from tests/php/type_rendering_003.phpt rename to tests/package/php/type_rendering_003.phpt index 0b534367..d4467856 100644 --- a/tests/php/type_rendering_003.phpt +++ b/tests/package/php/type_rendering_003.phpt @@ -4,27 +4,14 @@ Type rendering 003 - Constructorsynopsis parameters and parameter types true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +Config::init(["xml_file" => $xml_file]); + +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/variablelist_rendering_001.phpt b/tests/package/php/variablelist_rendering_001.phpt similarity index 66% rename from tests/php/variablelist_rendering_001.phpt rename to tests/package/php/variablelist_rendering_001.phpt index 5855f264..b5fece9e 100644 --- a/tests/php/variablelist_rendering_001.phpt +++ b/tests/package/php/variablelist_rendering_001.phpt @@ -4,30 +4,14 @@ Variablelist rendering 001 true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", -); +Config::init(["xml_file" => $xml_file]); -$extra = array( - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -); - -$render = new TestRender($formatclass, $opts, $extra); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} +$format = new TestPHPChunkedXHTML; +$render = new TestRender(new Reader, new Config, $format); $render->run(); ?> diff --git a/tests/php/bug_doc-en_GH-3179.phpt b/tests/php/bug_doc-en_GH-3179.phpt deleted file mode 100644 index 682ffe64..00000000 --- a/tests/php/bug_doc-en_GH-3179.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Bug doc-en GH-3197 ---FILE-- - true, - "xml_root" => dirname($xml_file), - "xml_file" => $xml_file, - "output_dir" => __DIR__ . "/output/", - "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/", - "phpweb_version_filename" => dirname($xml_file) . '/version.xml', - "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml', -]); - -$format = new TestChunkedXHTML; -$render = new TestRender($format, new Config); - -if (Index::requireIndexing() && !file_exists($opts["output_dir"])) { - mkdir($opts["output_dir"], 0755); -} - -$render->run(); -?> ---EXPECT-- -Filename: bug_doc-en_GH-3179.html -Content: -
-
-
method_name(): void
- -
- -
diff --git a/tests/setup.php b/tests/setup.php index b5612000..ea392add 100644 --- a/tests/setup.php +++ b/tests/setup.php @@ -5,19 +5,13 @@ define("__INSTALLDIR__", "@php_dir@" == "@"."php_dir@" ? dirname(dirname(__DIR__)) : "@php_dir@"); require_once __PHDDIR__ . "phpdotnet" . DIRECTORY_SEPARATOR . "phd" . DIRECTORY_SEPARATOR . "Autoloader.php"; -require_once __PHDDIR__ . "phpdotnet" . DIRECTORY_SEPARATOR . "phd" . DIRECTORY_SEPARATOR . "functions.php"; -require_once __PHDDIR__ . "tests" . DIRECTORY_SEPARATOR . "TestRender.php"; - spl_autoload_register(["phpdotnet\\phd\\Autoloader", "autoload"]); +require_once __PHDDIR__ . "phpdotnet" . DIRECTORY_SEPARATOR . "phd" . DIRECTORY_SEPARATOR . "functions.php"; + Config::init([ - "lang_dir" => __PHDDIR__ . DIRECTORY_SEPARATOR . "phpdotnet" . DIRECTORY_SEPARATOR - . "phd" . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR - . "langs" . DIRECTORY_SEPARATOR, - "phpweb_version_filename" => Config::xml_root() . DIRECTORY_SEPARATOR . 'version.xml', - "phpweb_acronym_filename" => Config::xml_root() . DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'acronyms.xml', - "phpweb_sources_filename" => Config::xml_root() . DIRECTORY_SEPARATOR . 'sources.xml', + "lang_dir" => __DIR__ . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR + . "phpdotnet" . DIRECTORY_SEPARATOR . "phd" . DIRECTORY_SEPARATOR + . "data" . DIRECTORY_SEPARATOR . "langs" . DIRECTORY_SEPARATOR, "package_dirs" => [__PHDDIR__, __INSTALLDIR__], ]); - -