From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Fri, 8 Jan 2021 10:42:31 -0400
Subject: Define and use TEST_PATH for Debian CI

Origin: vendor
Forwarded: not-needed
Acked-by: William Desportes <williamdes@wdes.fr>
---
 test/bootstrap-dist.php     | 4 ++++
 test/classes/ConfigTest.php | 4 ++--
 test/classes/ThemeTest.php  | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/bootstrap-dist.php b/test/bootstrap-dist.php
index 97f89c0..c4e534d 100644
--- a/test/bootstrap-dist.php
+++ b/test/bootstrap-dist.php
@@ -18,6 +18,10 @@ if (! defined('ROOT_PATH')) {
     define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
 }
 
+if (! defined('TEST_PATH')) {
+    define('TEST_PATH', ROOT_PATH);
+}
+
 /**
  * Set precision to sane value, with higher values
  * things behave slightly unexpectedly, for example
diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php
index 4ebf8fe..6aa17e8 100644
--- a/test/classes/ConfigTest.php
+++ b/test/classes/ConfigTest.php
@@ -903,11 +903,11 @@ class ConfigTest extends PmaTestCase
     {
         return [
             [
-                ROOT_PATH . 'test/test_data/config.inc.php',
+                TEST_PATH . 'test/test_data/config.inc.php',
                 true,
             ],
             [
-                ROOT_PATH . 'test/test_data/config-nonexisting.inc.php',
+                TEST_PATH . 'test/test_data/config-nonexisting.inc.php',
                 false,
             ],
             [
diff --git a/test/classes/ThemeTest.php b/test/classes/ThemeTest.php
index 0ccda38..dab39ae 100644
--- a/test/classes/ThemeTest.php
+++ b/test/classes/ThemeTest.php
@@ -91,7 +91,7 @@ class ThemeTest extends PmaTestCase
      */
     public function testCheckImgPathFull()
     {
-        $this->object->setFsPath(ROOT_PATH . 'test/classes/_data/gen_version_info/');
+        $this->object->setFsPath(TEST_PATH . 'test/classes/_data/gen_version_info/');
         $this->assertTrue($this->object->loadInfo());
         $this->assertEquals('Test Theme', $this->object->getName());
         $this->assertEquals('5.0', $this->object->getVersion());
