Skip to content

Commit ba5502b

Browse files
author
Ibrahim BinAlshikh
committed
fix(test): add clearstatcache() before class_exists in AddLangCommandTest
PHP 8.3 caches file_exists() results via realpath_cache, causing the autoloader to not see newly created class files. clearstatcache() forces a fresh filesystem check.
1 parent 369d756 commit ba5502b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/WebFiori/Framework/Tests/Cli/AddLangCommandTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function testAddLang00() {
4444
"1: rtl\n",
4545
"Success: Language added. Also, a class for the language is created at \"".APP_DIR."\Langs\" for that language.\n"
4646
], $output);
47+
clearstatcache();
4748
$this->assertTrue(class_exists('\\App\\Langs\\Lang'.$langCode));
4849
$this->removeClass('\\App\\Langs\\Lang'.$langCode);
4950
Controller::getDriver()->initialize();

0 commit comments

Comments
 (0)