Add TEST_PATH for out of source tests

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2023-02-08 13:09:00 +01:00
parent cc7efe3950
commit 84aee1b13b
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 5 additions and 5 deletions

View File

@ -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([

View File

@ -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'