From 1dbd4bbb43828a7d4666d9f8a9c94dd41ac5be24 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Wed, 29 Oct 2025 21:23:01 +0300 Subject: [PATCH] fix: Fixed test Transformers --- tests/system/Commands/TransformerGeneratorTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/system/Commands/TransformerGeneratorTest.php b/tests/system/Commands/TransformerGeneratorTest.php index a37a29099eaa..588bf3243d68 100644 --- a/tests/system/Commands/TransformerGeneratorTest.php +++ b/tests/system/Commands/TransformerGeneratorTest.php @@ -27,8 +27,10 @@ final class TransformerGeneratorTest extends CIUnitTestCase protected function tearDown(): void { - $result = str_replace(["\033[0;32m", "\033[0m", "\n"], '', $this->getStreamFilterBuffer()); - $file = str_replace('APPPATH' . DIRECTORY_SEPARATOR, APPPATH, trim(substr($result, 14))); + $result = str_replace(["\033[0;33m", "\033[0;32m", "\033[0m", "\n"], '', $this->getStreamFilterBuffer()); + preg_match('/APPPATH(\/[^\s"]+\.php)/', $result, $matches); + $file = isset($matches[0]) ? str_replace('APPPATH' . DIRECTORY_SEPARATOR, APPPATH, $matches[0]) : ''; + if (is_file($file)) { unlink($file); }