mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
💚 add beforeSetup phpunit group to run test before setup
This commit is contained in:
@@ -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"],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user