From 50e40879de9f2dc80aa2fbb054aa4c25c4bf1103 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 13 Jun 2024 18:16:26 +0200 Subject: [PATCH] =?UTF-8?q?:white=5Fcheck=5Fmark:=20N=C2=B07571=20-=20HTML?= =?UTF-8?q?2Text=20lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unitary-tests/application/utilsTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/php-unit-tests/unitary-tests/application/utilsTest.php b/tests/php-unit-tests/unitary-tests/application/utilsTest.php index ec1ec4cfc..ca9283d31 100644 --- a/tests/php-unit-tests/unitary-tests/application/utilsTest.php +++ b/tests/php-unit-tests/unitary-tests/application/utilsTest.php @@ -29,6 +29,19 @@ use utils; */ class utilsTest extends ItopTestCase { + protected function setUp(): void + { + parent::setUp(); + $this->SetNonPublicStaticProperty(utils::class, 'sAbsoluteUrlAppRootCache', 'https://localhost/itop/'); + } + + protected function tearDown(): void + { + $this->SetNonPublicStaticProperty(utils::class, 'sAbsoluteUrlAppRootCache', null); + parent::tearDown(); + } + + public function testEndsWith() { $this->assertFalse(utils::EndsWith('a', 'bbbb')); @@ -640,6 +653,7 @@ class utilsTest extends ItopTestCase public function testGetMentionedObjectsFromText($sInput, $sFormat, $aExceptedMentionedObjects) { // Emulate the "Case provider mechanism" (reason: the data provider requires utils constants not available before the application startup) + echo "testGetMentionedObjectsFromText: input = $sInput\n"; $aTestedMentionedObjects = utils::GetMentionedObjectsFromText($sInput, $sFormat); $sExpectedAsString = print_r($aExceptedMentionedObjects, true);