From 64fcb9f9387818f1ca70912ee0728340163e20a3 Mon Sep 17 00:00:00 2001 From: Ibrahim BinAlshikh Date: Thu, 27 Jun 2024 00:00:38 +0300 Subject: [PATCH] test: Fix a Bug in Test Case --- tests/webfiori/tests/error/SampleHandler1.php | 2 +- tests/webfiori/tests/error/SampleHandler2.php | 2 +- tests/webfiori/tests/error/SampleHandler3.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/webfiori/tests/error/SampleHandler1.php b/tests/webfiori/tests/error/SampleHandler1.php index e5bec47..5949233 100644 --- a/tests/webfiori/tests/error/SampleHandler1.php +++ b/tests/webfiori/tests/error/SampleHandler1.php @@ -12,7 +12,7 @@ public function __construct() { $this->setName('H1'); } public function handle() { - define('SampleHandler1', 'Yes'); + !defined('SampleHandler1') ? define('SampleHandler1', 'Yes') : ''; } public function isActive(): bool { diff --git a/tests/webfiori/tests/error/SampleHandler2.php b/tests/webfiori/tests/error/SampleHandler2.php index 8f9f8da..1016264 100644 --- a/tests/webfiori/tests/error/SampleHandler2.php +++ b/tests/webfiori/tests/error/SampleHandler2.php @@ -12,7 +12,7 @@ public function __construct() { $this->setName('H2'); } public function handle() { - define('SampleHandler2', 'Yes'); + !defined('SampleHandler2') ? define('SampleHandler2', 'Yes') : ''; } public function isActive(): bool { diff --git a/tests/webfiori/tests/error/SampleHandler3.php b/tests/webfiori/tests/error/SampleHandler3.php index 5c89f8c..cd2ca65 100644 --- a/tests/webfiori/tests/error/SampleHandler3.php +++ b/tests/webfiori/tests/error/SampleHandler3.php @@ -12,7 +12,7 @@ public function __construct() { $this->setName('H3'); } public function handle() { - define('SampleHandler3', 'Yes'); + !defined('SampleHandler3') ? define('SampleHandler3', 'Yes') : ''; } public function isActive(): bool {