-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Move test to abstract class testing
Relates: #508
- Loading branch information
Showing
3 changed files
with
111 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
pkgs ? import <nixpkgs> { } | ||
,phpVersion ? "php81" | ||
}: | ||
|
||
let | ||
php = pkgs.${phpVersion}.buildEnv { | ||
extensions = { enabled, all }: enabled ++ (with all; [ | ||
xdebug | ||
]); | ||
|
||
extraConfig = '' | ||
xdebug.mode = debug | ||
memory_limit = 4G | ||
''; | ||
}; | ||
inherit(pkgs."${phpVersion}Packages") composer; | ||
|
||
projectInstall = pkgs.writeShellApplication { | ||
name = "project-install"; | ||
runtimeInputs = [ | ||
php | ||
composer | ||
]; | ||
text = '' | ||
composer update --prefer-dist --no-progress | ||
''; | ||
}; | ||
|
||
projectCgl = pkgs.writeShellApplication { | ||
name = "project-cgl"; | ||
|
||
runtimeInputs = [ | ||
php | ||
]; | ||
|
||
text = '' | ||
./.build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --diff | ||
''; | ||
}; | ||
|
||
projectCglFix = pkgs.writeShellApplication { | ||
name = "project-cgl-fix"; | ||
|
||
runtimeInputs = [ | ||
php | ||
]; | ||
|
||
text = '' | ||
./.build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php | ||
''; | ||
}; | ||
|
||
projectTestUnit = pkgs.writeShellApplication { | ||
name = "project-test-unit"; | ||
runtimeInputs = [ | ||
php | ||
projectInstall | ||
]; | ||
text = '' | ||
project-install | ||
.build/bin/phpunit -c Build/UnitTests.xml | ||
''; | ||
}; | ||
|
||
projectTestFunctional = pkgs.writeShellApplication { | ||
name = "project-test-functional"; | ||
runtimeInputs = [ | ||
php | ||
projectInstall | ||
]; | ||
text = '' | ||
project-install | ||
.build/bin/phpunit -c Build/FunctionalTests.xml | ||
''; | ||
}; | ||
|
||
in pkgs.mkShell { | ||
name = "TYPO3 Extension cart"; | ||
buildInputs = [ | ||
php | ||
composer | ||
projectInstall | ||
projectCgl | ||
projectCglFix | ||
projectTestUnit | ||
projectTestFunctional | ||
]; | ||
|
||
shellHook = '' | ||
export PROJECT_ROOT="$(pwd)" | ||
export typo3DatabaseDriver=pdo_sqlite | ||
''; | ||
} |