💚 add beforeSetup phpunit group to run test before setup

This commit is contained in:
odain
2020-10-14 13:03:36 +02:00
parent 2221e0541c
commit 6e6557e909

View File

@@ -100,6 +100,8 @@ class ThemeHandlerTest extends ItopTestCase
* @param $sPrecompiledStylesheet
* @param $oTheme
*
* @group beforeSetup
*
* @throws \Exception
*/
public function testValidatePrecompiledStyles()
@@ -619,4 +621,29 @@ SCSS;
[ '/var/www/html/iTop/css/ui-lightness/images/ui-icons_222222_256x240.png', '/var/www/html/iTop/env-production//branding/themes/light-grey//../../../../css/ui-lightness/images/ui-icons_222222_256x240.png' ]
];
}
/**
* @param $sConfig
* @dataProvider configProvider
*/
public function testConfig($sExcludeGroupConfig, $sExpectedCmd) {
$sGroupCommand = "";
if (! empty($sExcludeGroupConfig)) {
foreach (explode(",", $sExcludeGroupConfig) as $sExcludedGroup){
$sGroupCommand .= "--exclude-group " . trim($sExcludedGroup) . " ";
}
}
$this->assertEquals($sExpectedCmd, trim($sGroupCommand));
}
public function configProvider(){
return [
[ "", ""],
[ "skipPostBuild", "--exclude-group skipPostBuild"],
[ "skipPostBuild,beforeSetup", "--exclude-group skipPostBuild --exclude-group beforeSetup"],
];
}
}