1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
From: William Desportes <williamdes@wdes.fr>
Date: Wed, 8 Feb 2023 13:18:03 +0100
Subject: Adjust path for source files in tests
Origin: upstream
Forwarded: https://github.com/phpmyadmin/phpmyadmin/commit/84aee1b13b7db73d85d8f42390bcdcc3f6abcd95.patch
---
test/classes/Command/TwigLintCommandTest.php | 8 ++++----
test/classes/ThemeTest.php | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/classes/Command/TwigLintCommandTest.php b/test/classes/Command/TwigLintCommandTest.php
index f56f9a0..c87cac0 100644
--- a/test/classes/Command/TwigLintCommandTest.php
+++ b/test/classes/Command/TwigLintCommandTest.php
@@ -44,7 +44,7 @@ class TwigLintCommandTest extends AbstractTestCase
public function testGetTemplateContents(): void
{
$contents = $this->callFunction($this->command, TwigLintCommand::class, 'getTemplateContents', [
- ROOT_PATH . 'test/classes/_data/file_listing/subfolder/one.ini',
+ TEST_PATH . 'test/classes/_data/file_listing/subfolder/one.ini',
]);
$this->assertSame('key=value' . "\n", $contents);
@@ -52,7 +52,7 @@ class TwigLintCommandTest extends AbstractTestCase
public function testFindFiles(): void
{
- $path = ROOT_PATH . 'test/classes/_data/file_listing';
+ $path = TEST_PATH . 'test/classes/_data/file_listing';
$filesFound = $this->callFunction($this->command, TwigLintCommand::class, 'findFiles', [$path]);
// Sort results to avoid file system test specific failures
@@ -68,7 +68,7 @@ class TwigLintCommandTest extends AbstractTestCase
public function testGetFilesInfo(): void
{
- $path = ROOT_PATH . 'test/classes/_data/file_listing';
+ $path = TEST_PATH . 'test/classes/_data/file_listing';
$filesInfos = $this->callFunction($this->command, TwigLintCommand::class, 'getFilesInfo', [$path]);
// Sort results to avoid file system test specific failures
@@ -122,7 +122,7 @@ class TwigLintCommandTest extends AbstractTestCase
->willReturnOnConsecutiveCalls('{{ file }}', '{{ file }');
$filesFound = $this->callFunction($command, TwigLintCommand::class, 'getFilesInfo', [
- ROOT_PATH . 'test/classes/_data/file_listing',
+ TEST_PATH . 'test/classes/_data/file_listing',
]);
$this->assertEquals([
diff --git a/test/classes/ThemeTest.php b/test/classes/ThemeTest.php
index e21e363..a088b61 100644
--- a/test/classes/ThemeTest.php
+++ b/test/classes/ThemeTest.php
@@ -69,7 +69,7 @@ class ThemeTest extends AbstractTestCase
*/
public function testCheckImgPathIncorrect(): void
{
- $this->object->setPath(ROOT_PATH . 'test/classes/_data/incorrect_theme');
+ $this->object->setPath(TEST_PATH . 'test/classes/_data/incorrect_theme');
$this->assertFalse(
$this->object->loadInfo(),
'Theme name is not properly set'
|