Skip to content

Commit

Permalink
[BUGFIX] Correct file path in acceptance tests
Browse files Browse the repository at this point in the history
codeception seeFileFound() and dontSeeFileFound() apply
some path magic if relative files are given. It leads
to wrong paths. This is however not (yet) shown due to
error suppression in the suite.
To work on ac test error handling for increased PHP 8
compatibility, this needs to be sorted out first.

Resolves: #93732
Releases: master, 10.4
Change-Id: I0f69ec066069261e7b47afa44e934c0b5ee02b51
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68379
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
lolli42 authored and maddy2101 committed Mar 14, 2021
1 parent 4a3981a commit add5ffc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -39,8 +39,8 @@ public function _after(BackendTester $I)
$I->amGoingTo('clean up created files');
unlink(Environment::getProjectPath() . '/' . self::ADDITIONAL_CONFIGURATION_FILEPATH);

$I->dontSeeFileFound(self::ENABLE_INSTALL_TOOL_FILEPATH);
$I->dontSeeFileFound(self::ADDITIONAL_CONFIGURATION_FILEPATH);
$I->dontSeeFileFound(Environment::getProjectPath() . '/' . self::ENABLE_INSTALL_TOOL_FILEPATH);
$I->dontSeeFileFound(Environment::getProjectPath() . '/' . self::ADDITIONAL_CONFIGURATION_FILEPATH);
}

protected function logIntoInstallTool(BackendTester $I)
Expand Down
Expand Up @@ -17,6 +17,7 @@

namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\InstallTool;

use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;

class LoginCest extends AbstractCest
Expand All @@ -32,12 +33,12 @@ public function installToolLogin(BackendTester $I)

$I->amGoingTo('lock the tool without logging in');
$I->writeToFile(self::ENABLE_INSTALL_TOOL_FILEPATH, '');
$I->seeFileFound(self::ENABLE_INSTALL_TOOL_FILEPATH);
$I->seeFileFound(Environment::getProjectPath() . '/' . self::ENABLE_INSTALL_TOOL_FILEPATH);
$I->reloadPage();
$I->see('Login to TYPO3 Install Tool');
$I->click('Lock Install Tool again');
$I->see('The Install Tool is locked');
$I->dontSeeFileFound(self::ENABLE_INSTALL_TOOL_FILEPATH);
$I->dontSeeFileFound(Environment::getProjectPath() . '/' . self::ENABLE_INSTALL_TOOL_FILEPATH);

$I->amGoingTo('log into Install Tool');
$this->logIntoInstallTool($I);
Expand Down

0 comments on commit add5ffc

Please sign in to comment.