Skip to content

Commit eca1e07

Browse files
authored
Merge pull request #6 from Codeception/make-tests-more-portable
Improved tests in order to run them from vendor/ directory
2 parents 963c83a + e6f0f87 commit eca1e07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/unit/Codeception/Module/FilesystemTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public function _tearDown()
3333

3434
public function testSeeFileFoundPassesWhenFileExists()
3535
{
36-
$this->module->seeFileFound('tests/_support/_generated/.gitignore');
36+
$this->module->seeFileFound(codecept_root_dir('tests/_support/_generated/.gitignore'));
3737
}
3838

3939
public function testSeeFileFoundPassesWhenFileExistsInSubdirectoryOfPath()
4040
{
41-
$this->module->seeFileFound('UnitTesterActions.php', 'tests/_support/');
41+
$this->module->seeFileFound('UnitTesterActions.php', codecept_root_dir('tests/_support/'));
4242
}
4343

4444
public function testSeeFileFoundFailsWhenFileDoesNotExist()
@@ -68,8 +68,8 @@ public function testDontSeeFileFoundPassesWhenFileDoesNotExistsInPath()
6868
public function testDontSeeFileFoundFailsWhenFileExists()
6969
{
7070
$this->expectException(AssertionFailedError::class);
71-
$this->expectExceptionMessage('Failed asserting that file "tests/_support/_generated/.gitignore" does not exist.');
72-
$this->module->dontSeeFileFound('tests/_support/_generated/.gitignore');
71+
$this->expectExceptionMessageRegExp('/Failed asserting that file ".*tests\/_support\/_generated\/\.gitignore" does not exist\./');
72+
$this->module->dontSeeFileFound(codecept_root_dir('tests/_support/_generated/.gitignore'));
7373
}
7474

7575
public function testDontSeeFileFoundFailsWhenPathDoesNotExist()

0 commit comments

Comments
 (0)