[DOC-CVS] [phd] master: Fix borked test render_001.phpt and resolve race condition

[email protected] (Jordi Kroon)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Jordi Kroon (jordikroon)
Date: 2026-08-18T20:55:03+02:00

Commit: https://github.com/php/phd/commit/9f7a92f74cdbf6781c40ab4a613c82c66bd0661b
Raw diff: https://github.com/php/phd/commit/9f7a92f74cdbf6781c40ab4a613c82c66bd0661b.diff

Fix borked test render_001.phpt and resolve race condition

Changed paths:
  M  tests/GH-225.phpt
  M  tests/options/default_handler_008.phpt
  M  tests/render/render_001.phpt


Diff:

diff --git a/tests/GH-225.phpt b/tests/GH-225.phpt
index 086426e1..e8049cab 100644
--- a/tests/GH-225.phpt
+++ b/tests/GH-225.phpt
@@ -2,6 +2,8 @@
 GH-225 - SaveConfig tries to overwrite readonly property
 --ARGS--
 --docbook tests/data/bug-GH-225.xml --quit
+--CONFLICTS--
+all
 --FILE--
 <?php
 namespace phpdotnet\phd;
diff --git a/tests/options/default_handler_008.phpt b/tests/options/default_handler_008.phpt
index a38b6f3b..27322cd6 100644
--- a/tests/options/default_handler_008.phpt
+++ b/tests/options/default_handler_008.phpt
@@ -2,6 +2,8 @@
 Default options handler 008 - Save config (long option) and quit (long option)
 --ARGS--
 --docbook tests/options/default_handler_008.phpt --saveconfig --quit
+--CONFLICTS--
+all
 --SKIPIF--
 <?php
 if (file_exists(__DIR__ . "/../../phd.config.php")) {
diff --git a/tests/render/render_001.phpt b/tests/render/render_001.phpt
index 813bfa9d..1cf162be 100644
--- a/tests/render/render_001.phpt
+++ b/tests/render/render_001.phpt
@@ -6,8 +6,23 @@ Render 001 - Smoke test render.php
 <?php
 namespace phpdotnet\phd;
 
+if (!\file_exists(__DIR__ . "/../../output/")) {
+    \mkdir(__DIR__ . "/../../output/", 0777, true);
+}
+
 require_once __DIR__ . "/../../render.php";
 ?>
+--CLEAN--
+<?php
+$iterator = new \RecursiveIteratorIterator(
+    new \RecursiveDirectoryIterator(__DIR__ . "/../../output/", \FilesystemIterator::SKIP_DOTS),
+    \RecursiveIteratorIterator::CHILD_FIRST
+);
+foreach ($iterator as $file) {
+    $file->isDir() ? \rmdir($file->getPathname()) : \unlink($file->getPathname());
+}
+\rmdir(__DIR__ . "/../../output/");
+?>
 --EXPECTF--
 %s[%d:%d:%d - Indexing              ]%s Indexing...
 %s[%d:%d:%d - Rendering Style       ]%s Running full build
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.