From aa20859406f0b5c320d579f0238321576a6c6c80 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Fri, 27 Oct 2023 21:35:51 -0400 Subject: [PATCH] can't check files that aren't real --- tests/phpunit/Civi/Angular/ManagerTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/Civi/Angular/ManagerTest.php b/tests/phpunit/Civi/Angular/ManagerTest.php index 39d5233502..5af2e7bbfe 100644 --- a/tests/phpunit/Civi/Angular/ManagerTest.php +++ b/tests/phpunit/Civi/Angular/ManagerTest.php @@ -56,7 +56,11 @@ class ManagerTest extends \CiviUnitTestCase { if (isset($module['js'])) { $this->assertTrue(is_array($module['js'])); foreach ($module['js'] as $file) { - $this->assertTrue(file_exists($this->res->getPath($module['ext'], $file)), "File '$file' not found for " . $module['ext']); + $filePath = $this->res->getPath($module['ext'], $file); + // Some files aren't real paths, like assetBuilder://afform.js?... + if ($filePath !== FALSE) { + $this->assertTrue(file_exists($filePath), "File '$file' not found for " . $module['ext']); + } $counts['js']++; } } -- 2.25.1