Add TEST_PATH for out of source tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
cc7efe3950
commit
84aee1b13b
@ -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([
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user