mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge branch 'feature/2982-finalize' into develop
This commit is contained in:
@@ -46,11 +46,10 @@ class ThemeHandler
|
||||
'name' => 'fullmoon',
|
||||
'parameters' => [
|
||||
'variables' => [],
|
||||
'imports' => [
|
||||
],
|
||||
'imports' => [],
|
||||
'stylesheets' => [
|
||||
'main' => '../css/backoffice/main.scss',
|
||||
],
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -216,7 +215,7 @@ class ThemeHandler
|
||||
* @param boolean $bSetup
|
||||
* @param string $sSetupCompilationTimestamp : setup compilation timestamp in micro secunds
|
||||
* @param array|null $aThemeParameters Parameters (variables, imports, stylesheets) for the theme, if not passed, will be retrieved from compiled DM
|
||||
* @param array|null $aImportsPaths Paths where imports can be found. Must end with '/'
|
||||
* @param array|null $aImportsPaths Folder paths where imports can be found. Must end with '/'
|
||||
* @param string|null $sWorkingPath Path of the folder used during compilation. Must end with a '/'
|
||||
*
|
||||
* @throws \CoreException
|
||||
@@ -261,15 +260,21 @@ class ThemeHandler
|
||||
}
|
||||
}
|
||||
|
||||
$aThemeParametersWithVersion = self::CloneThemeParameterAndIncludeVersion($aThemeParameters, $sSetupCompilationTimestampInSecunds);
|
||||
$aThemeParametersWithVersion = self::CloneThemeParameterAndIncludeVersion($aThemeParameters, $sSetupCompilationTimestampInSecunds, $aImportsPaths);
|
||||
|
||||
clearstatcache();
|
||||
|
||||
// Loading files to import and stylesheet to compile, also getting most recent modification time on overall files
|
||||
$sTmpThemeScssContent = '';
|
||||
$oFindStylesheetObject = new FindStylesheetObject();
|
||||
if (isset($aThemeParameters['imports_utility'])) {
|
||||
foreach ($aThemeParameters['imports_utility'] as $sImport) {
|
||||
if (isset($aThemeParameters['variable_imports'])) {
|
||||
foreach ($aThemeParameters['variable_imports'] as $sImport) {
|
||||
static::FindStylesheetFile($sImport, $aImportsPaths, $oFindStylesheetObject);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($aThemeParameters['utility_imports'])) {
|
||||
foreach ($aThemeParameters['utility_imports'] as $sImport) {
|
||||
static::FindStylesheetFile($sImport, $aImportsPaths, $oFindStylesheetObject);
|
||||
}
|
||||
}
|
||||
@@ -343,11 +348,12 @@ CSS;
|
||||
static::$oCompileCSSService = new CompileCSSService();
|
||||
}
|
||||
//store it again to change $version with latest compiled time
|
||||
SetupLog::Info("Compiling theme $sThemeId...");
|
||||
$sTmpThemeCssContent = static::$oCompileCSSService->CompileCSSFromSASS($sTmpThemeScssContent, $aImportsPaths,
|
||||
$aThemeParametersWithVersion);
|
||||
SetupLog::Info("$sThemeId theme compilation done.");
|
||||
file_put_contents($sThemeFolderPath.'/theme-parameters.json', json_encode($aThemeParameters));
|
||||
file_put_contents($sThemeCssPath, $sSignatureComment.$sTmpThemeCssContent);
|
||||
SetupLog::Info("Theme $sThemeId file compiled.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -373,27 +379,29 @@ CSS;
|
||||
$aSignature = [
|
||||
'variables' => md5(json_encode($aThemeParameters['variables'])),
|
||||
'stylesheets' => [],
|
||||
'imports' => [],
|
||||
'images' => []
|
||||
'variable_imports' => [],
|
||||
'images' => [],
|
||||
'utility_imports' => []
|
||||
];
|
||||
|
||||
$oFindStylesheetObject = new FindStylesheetObject();
|
||||
|
||||
if (isset($aThemeParameters['imports_variable'])) {
|
||||
foreach ($aThemeParameters['imports_variable'] as $key => $sImport) {
|
||||
if (isset($aThemeParameters['variable_imports'])) {
|
||||
foreach ($aThemeParameters['variable_imports'] as $key => $sImport) {
|
||||
static::FindStylesheetFile($sImport, $aImportsPaths, $oFindStylesheetObject);
|
||||
$sFile = $oFindStylesheetObject->GetLastStylesheetFile();
|
||||
if (!empty($sFile)) {
|
||||
$aSignature['stylesheets'][$key] = md5_file($sFile);
|
||||
$aSignature['variable_imports'][$key] = md5_file($sFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($aThemeParameters['imports_utility'])) {
|
||||
foreach ($aThemeParameters['imports_utility'] as $key => $sImport) {
|
||||
|
||||
if (isset($aThemeParameters['utility_imports'])) {
|
||||
foreach ($aThemeParameters['utility_imports'] as $key => $sImport) {
|
||||
static::FindStylesheetFile($sImport, $aImportsPaths, $oFindStylesheetObject);
|
||||
$sFile = $oFindStylesheetObject->GetLastStylesheetFile();
|
||||
if (!empty($sFile)) {
|
||||
$aSignature['stylesheets'][$key] = md5_file($sFile);
|
||||
$aSignature['utility_imports'][$key] = md5_file($sFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -411,7 +419,7 @@ CSS;
|
||||
$aFiles = $oFindStylesheetObject->GetImportPaths();
|
||||
if (count($aFiles) !== 0) {
|
||||
foreach ($aFiles as $sFileURI => $sFilePath) {
|
||||
$aSignature['imports_utility'][$sFileURI] = md5_file($sFilePath);
|
||||
$aSignature['utility_imports'][$sFileURI] = md5_file($sFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,10 +936,11 @@ CSS;
|
||||
* Clone variable array and include $version with bSetupCompilationTimestamp value
|
||||
* @param $aThemeParameters
|
||||
* @param $bSetupCompilationTimestamp
|
||||
* @param $aImportsPaths
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function CloneThemeParameterAndIncludeVersion($aThemeParameters, $bSetupCompilationTimestamp)
|
||||
public static function CloneThemeParameterAndIncludeVersion($aThemeParameters, $bSetupCompilationTimestamp, $aImportsPaths)
|
||||
{
|
||||
$aThemeParametersVariable = [];
|
||||
if (array_key_exists('variables', $aThemeParameters))
|
||||
@@ -940,12 +949,13 @@ CSS;
|
||||
{
|
||||
$aThemeParametersVariable = array_merge([], $aThemeParameters['variables']);
|
||||
}
|
||||
}
|
||||
if (array_key_exists('imports_variable', $aThemeParameters))
|
||||
}
|
||||
|
||||
if (array_key_exists('variable_imports', $aThemeParameters))
|
||||
{
|
||||
if (is_array($aThemeParameters['imports_variable']))
|
||||
if (is_array($aThemeParameters['variable_imports']))
|
||||
{
|
||||
$aThemeParametersVariable = array_merge($aThemeParametersVariable, static::GetVariablesFromFile($aThemeParameters['imports_variable']));
|
||||
$aThemeParametersVariable = array_merge($aThemeParametersVariable, static::GetVariablesFromFile($aThemeParameters['variable_imports'], $aImportsPaths));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -955,20 +965,30 @@ CSS;
|
||||
|
||||
/**
|
||||
* @param $aVariableFiles
|
||||
* @param $aImportsPaths
|
||||
*
|
||||
* @return array
|
||||
* @since 3.0.0 N°3593
|
||||
*/
|
||||
public static function GetVariablesFromFile($aVariableFiles){
|
||||
public static function GetVariablesFromFile($aVariableFiles, $aImportsPaths){
|
||||
$aVariablesResults = [];
|
||||
foreach ($aVariableFiles as $sVariableFile)
|
||||
{
|
||||
$sFileContent = file_get_contents(APPROOT.'env-'.utils::GetCurrentEnvironment().'/'.$sVariableFile);
|
||||
$aVariableMatches = [];
|
||||
|
||||
preg_match_all( '/\$(.*?):(.*?);/', $sFileContent,$aVariableMatches);
|
||||
$aVariableMatches = array_combine( $aVariableMatches[1], array_map( function($sVariableValue) { return ltrim($sVariableValue); }, $aVariableMatches[2] ) );
|
||||
$aVariablesResults = array_merge($aVariablesResults, $aVariableMatches);
|
||||
foreach($aImportsPaths as $sPath) {
|
||||
$sFilePath = $sPath.'/'.$sVariableFile;
|
||||
$sImportedFile = realpath($sFilePath);
|
||||
if ($sImportedFile !== false) {
|
||||
$sFileContent = file_get_contents($sImportedFile);
|
||||
$aVariableMatches = [];
|
||||
|
||||
preg_match_all('/\s*\$(.*?)\s*:\s*[\"\']{0,1}(.*?)[\"\']{0,1}\s*[;!]/', $sFileContent, $aVariableMatches);
|
||||
$aVariableMatches = array_combine($aVariableMatches[1], array_map(function ($sVariableValue) {
|
||||
return $sVariableValue;
|
||||
}, $aVariableMatches[2]));
|
||||
$aVariablesResults = array_merge($aVariablesResults, $aVariableMatches);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
array_map( function($sVariableValue) { return ltrim($sVariableValue); }, $aVariablesResults );
|
||||
return $aVariablesResults;
|
||||
|
||||
35
application/themehandlerservice.class.inc.php
Normal file
35
application/themehandlerservice.class.inc.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2013-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class ThemeHandlerService : used to ease testing MFCompiler::CompileThemes class via mocks
|
||||
*
|
||||
* @author Olivier DAIN <olivier.dain@combodo.com>
|
||||
* @since 3.0.0 N°2982
|
||||
*/
|
||||
class ThemeHandlerService
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function CompileTheme($sThemeId, $bSetup = false, $sSetupCompilationTimestamp="", $aThemeParameters = null, $aImportsPaths = null, $sWorkingPath = null){
|
||||
return ThemeHandler::CompileTheme($sThemeId, $bSetup, $sSetupCompilationTimestamp="", $aThemeParameters, $aImportsPaths, $sWorkingPath);
|
||||
}
|
||||
}
|
||||
@@ -1399,6 +1399,14 @@ class Config
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => true,
|
||||
],
|
||||
'theme.enable_precompilation' => [
|
||||
'type' => 'bool',
|
||||
'description' => 'If false, theme compilation will not use any precompiled file setup optimization.)',
|
||||
'default' => true,
|
||||
'value' => true,
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
],
|
||||
];
|
||||
|
||||
public function IsProperty($sPropCode)
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1917,6 +1917,7 @@ return array(
|
||||
'TemplateString' => $baseDir . '/core/templatestring.class.inc.php',
|
||||
'TemplateStringPlaceholder' => $baseDir . '/core/templatestring.class.inc.php',
|
||||
'ThemeHandler' => $baseDir . '/application/themehandler.class.inc.php',
|
||||
'ThemeHandlerService' => $baseDir . '/application/themehandlerservice.class.inc.php',
|
||||
'ToolsLog' => $baseDir . '/core/log.class.inc.php',
|
||||
'Trigger' => $baseDir . '/core/trigger.class.inc.php',
|
||||
'TriggerOnObject' => $baseDir . '/core/trigger.class.inc.php',
|
||||
|
||||
@@ -2147,6 +2147,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
|
||||
'TemplateString' => __DIR__ . '/../..' . '/core/templatestring.class.inc.php',
|
||||
'TemplateStringPlaceholder' => __DIR__ . '/../..' . '/core/templatestring.class.inc.php',
|
||||
'ThemeHandler' => __DIR__ . '/../..' . '/application/themehandler.class.inc.php',
|
||||
'ThemeHandlerService' => __DIR__ . '/../..' . '/application/themehandlerservice.class.inc.php',
|
||||
'ToolsLog' => __DIR__ . '/../..' . '/core/log.class.inc.php',
|
||||
'Trigger' => __DIR__ . '/../..' . '/core/trigger.class.inc.php',
|
||||
'TriggerOnObject' => __DIR__ . '/../..' . '/core/trigger.class.inc.php',
|
||||
|
||||
@@ -53,6 +53,8 @@ class MFCompiler
|
||||
{
|
||||
const DATA_PRECOMPILED_FOLDER = 'data' . DIRECTORY_SEPARATOR . 'precompiled_styles' . DIRECTORY_SEPARATOR;
|
||||
|
||||
private static $oThemeHandlerService;
|
||||
|
||||
/** @var \ModelFactory */
|
||||
protected $oFactory;
|
||||
|
||||
@@ -2792,11 +2794,10 @@ EOF;
|
||||
/**
|
||||
* @param \MFElement $oBrandingNode
|
||||
* @param string $sTempTargetDir
|
||||
* @param string $sFinalTargetDir
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function CompileThemes($oBrandingNode, $sTempTargetDir, $sFinalTargetDir)
|
||||
protected function CompileThemes($oBrandingNode, $sTempTargetDir)
|
||||
{
|
||||
// Make sure temp. target dir. ends with a '/'
|
||||
$sTempTargetDir .= '/';
|
||||
@@ -2827,10 +2828,9 @@ EOF;
|
||||
$sThemeId = $oTheme->getAttribute('id');
|
||||
$aThemeParameters = array(
|
||||
'variables' => array(),
|
||||
'imports_variable' => array(),
|
||||
'imports_utility' => array(),
|
||||
'variable_imports' => array(),
|
||||
'utility_imports' => array(),
|
||||
'stylesheets' => array(),
|
||||
'precompiled_stylesheet' => '',
|
||||
);
|
||||
|
||||
/** @var \DOMNodeList $oVariables */
|
||||
@@ -2846,13 +2846,13 @@ EOF;
|
||||
foreach($oImports as $oImport)
|
||||
{
|
||||
$sImportId = $oImport->getAttribute('id');
|
||||
if($oImport->getAttribute('xsi:type') === 'variable')
|
||||
if($oImport->getAttribute('xsi:type') === 'variables')
|
||||
{
|
||||
$aThemeParameters['imports_variable'][$sImportId] = $oImport->GetText();
|
||||
$aThemeParameters['variable_imports'][$sImportId] = $oImport->GetText();
|
||||
}
|
||||
else if($oImport->getAttribute('xsi:type') === 'utility')
|
||||
else
|
||||
{
|
||||
$aThemeParameters['imports_utility'][$sImportId] = $oImport->GetText();
|
||||
$aThemeParameters['utility_imports'][$sImportId] = $oImport->GetText();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2863,8 +2863,11 @@ EOF;
|
||||
$sStylesheetId = $oStylesheet->getAttribute('id');
|
||||
$aThemeParameters['stylesheets'][$sStylesheetId] = $oStylesheet->GetText();
|
||||
}
|
||||
$aThemeParameters['precompiled_stylesheet'] = $oTheme->GetChildText('precompiled_stylesheet', '');
|
||||
$aThemes[$sThemeId] = $aThemeParameters;
|
||||
|
||||
$aThemes[$sThemeId] = [
|
||||
'theme_parameters' => $aThemeParameters,
|
||||
'precompiled_stylesheet' => $oTheme->GetChildText('precompiled_stylesheet', '')
|
||||
];
|
||||
}
|
||||
|
||||
// Force to have a default theme if none in the DM
|
||||
@@ -2881,8 +2884,11 @@ EOF;
|
||||
|
||||
// Compile themes
|
||||
$fStart = microtime(true);
|
||||
foreach($aThemes as $sThemeId => $aThemeParameters)
|
||||
foreach($aThemes as $sThemeId => $aThemeInfos)
|
||||
{
|
||||
$aThemeParameters = $aThemeInfos['theme_parameters'];
|
||||
$sPrecompiledStylesheet = $aThemeInfos['precompiled_stylesheet'];
|
||||
|
||||
$sThemeDir = $sThemesDir.$sThemeId;
|
||||
if(!is_dir($sThemeDir))
|
||||
{
|
||||
@@ -2892,25 +2898,54 @@ EOF;
|
||||
// Check if a precompiled version of the theme is supplied
|
||||
$sPostCompilationLatestPrecompiledFile = $sPostCompilationPrecompiledThemeFolder . $sThemeId . ".css";
|
||||
|
||||
$sPrecompiledFileToUse = $this->UseLatestPrecompiledFile($sTempTargetDir, $aThemeParameters['precompiled_stylesheet'], $sPostCompilationLatestPrecompiledFile, $sThemeId);
|
||||
$sPrecompiledFileToUse = $this->UseLatestPrecompiledFile($sTempTargetDir, $sPrecompiledStylesheet, $sPostCompilationLatestPrecompiledFile, $sThemeId);
|
||||
if ($sPrecompiledFileToUse != null){
|
||||
copy($sPrecompiledFileToUse, $sThemeDir.'/main.css');
|
||||
// Make sure that the copy of the precompiled file is older than any other files to force a validation of the signature
|
||||
touch($sThemeDir.'/main.css', 1577836800 /* 2020-01-01 00:00:00 */);
|
||||
}
|
||||
|
||||
$bHasCompiled = ThemeHandler::CompileTheme($sThemeId, true, $this->sCompilationTimeStamp, $aThemeParameters, $aImportsPaths, $sTempTargetDir);
|
||||
if ($bHasCompiled)
|
||||
{
|
||||
SetupLog::Info("Replacing theme '$sThemeId' precompiled file in file $sPostCompilationLatestPrecompiledFile for next setup.");
|
||||
copy($sThemeDir.'/main.css', $sPostCompilationLatestPrecompiledFile);
|
||||
}else {
|
||||
if (!static::$oThemeHandlerService) {
|
||||
static::$oThemeHandlerService = new ThemeHandlerService();
|
||||
}
|
||||
$bHasCompiled = static::$oThemeHandlerService->CompileTheme($sThemeId, true, $this->sCompilationTimeStamp, $aThemeParameters, $aImportsPaths, $sTempTargetDir);
|
||||
|
||||
if ($bHasCompiled) {
|
||||
if (utils::GetConfig()->Get('theme.enable_precompilation')){
|
||||
if (utils::IsDevelopmentEnvironment() && ! empty(trim($sPrecompiledStylesheet)))
|
||||
{ //help developers to detect & push theme precompilation changes
|
||||
$sInitialPrecompiledFilePath = null;
|
||||
$aRootDirs = $this->oFactory->GetRootDirs();
|
||||
if (is_array($aRootDirs) && count($aRootDirs) !== 0) {
|
||||
foreach ($this->oFactory->GetRootDirs() as $sRootDir) {
|
||||
$sCurrentFile = $sRootDir. DIRECTORY_SEPARATOR . $sPrecompiledStylesheet;
|
||||
if (is_file($sCurrentFile) && is_writable($sCurrentFile)) {
|
||||
$sInitialPrecompiledFilePath = $sCurrentFile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($sInitialPrecompiledFilePath != null){
|
||||
SetupLog::Info("Replacing theme '$sThemeId' precompiled file in file $sInitialPrecompiledFilePath for next setup.");
|
||||
copy($sThemeDir.'/main.css', $sInitialPrecompiledFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
SetupLog::Info("Replacing theme '$sThemeId' precompiled file in file $sPostCompilationLatestPrecompiledFile for next setup.");
|
||||
copy($sThemeDir.'/main.css', $sPostCompilationLatestPrecompiledFile);
|
||||
}
|
||||
} else {
|
||||
SetupLog::Info("No theme '$sThemeId' compilation was required during setup.");
|
||||
}
|
||||
}
|
||||
$this->Log(sprintf('Themes compilation took: %.3f ms for %d themes.', (microtime(true) - $fStart)*1000.0, count($aThemes)));
|
||||
}
|
||||
|
||||
public static function SetThemeHandlerService(ThemeHandlerService $oThemeHandlerService): void {
|
||||
self::$oThemeHandlerService = $oThemeHandlerService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Choose between precompiled files declared in datamodel XMLs or latest precompiled files generated after latest setup.
|
||||
*
|
||||
@@ -2922,6 +2957,10 @@ EOF;
|
||||
* @return string : file path of latest precompiled file to use for setup
|
||||
*/
|
||||
public function UseLatestPrecompiledFile(string $sTempTargetDir, string $sPrecompiledFileUri, $sPostCompilationLatestPrecompiledFile, $sThemeId) : ?string {
|
||||
if (! utils::GetConfig()->Get('theme.enable_precompilation')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$bDataXmlPrecompiledFileExists = false;
|
||||
clearstatcache();
|
||||
if (!empty($sPrecompiledFileUri)){
|
||||
@@ -3003,7 +3042,7 @@ EOF;
|
||||
}
|
||||
|
||||
// Compile themes
|
||||
$this->CompileThemes($oBrandingNode, $sTempTargetDir, $sFinalTargetDir);
|
||||
$this->CompileThemes($oBrandingNode, $sTempTargetDir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -843,7 +843,7 @@ class iTopDesignFormat
|
||||
// Add new attribute to theme import nodes
|
||||
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme/imports/import');
|
||||
foreach ($oNodeList as $oNode) {
|
||||
$oNode->setAttribute('xsi:type', 'utility');
|
||||
$oNode->setAttribute('xsi:type', 'utilities');
|
||||
}
|
||||
|
||||
// Add Class Style
|
||||
|
||||
@@ -1838,6 +1838,13 @@ EOF;
|
||||
{
|
||||
return $this->oDOMDocument->GetNodes($sXPath, $oContextNode, $bSafe);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetRootDirs() {
|
||||
return $this->aRootDirs;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -119,4 +119,75 @@ class ItopTestCase extends TestCase
|
||||
|
||||
return $method->invokeArgs($oObject, $aArgs);
|
||||
}
|
||||
|
||||
public function RecurseRmdir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
if (is_dir($dir.DIRECTORY_SEPARATOR.$object))
|
||||
$this->RecurseRmdir($dir.DIRECTORY_SEPARATOR.$object);
|
||||
else
|
||||
unlink($dir.DIRECTORY_SEPARATOR.$object);
|
||||
}
|
||||
}
|
||||
rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
public function CreateTmpdir() {
|
||||
$sTmpDir=tempnam(sys_get_temp_dir(),'');
|
||||
if (file_exists($sTmpDir))
|
||||
{
|
||||
unlink($sTmpDir);
|
||||
}
|
||||
mkdir($sTmpDir);
|
||||
if (is_dir($sTmpDir))
|
||||
{
|
||||
return $sTmpDir;
|
||||
}
|
||||
|
||||
return sys_get_temp_dir();
|
||||
}
|
||||
|
||||
public function RecurseMkdir($sDir){
|
||||
if (strpos($sDir, DIRECTORY_SEPARATOR) === 0){
|
||||
$sPath = DIRECTORY_SEPARATOR;
|
||||
} else {
|
||||
$sPath = "";
|
||||
}
|
||||
|
||||
foreach (explode(DIRECTORY_SEPARATOR, $sDir) as $sSubDir){
|
||||
if (($sSubDir === '..')) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (( trim($sSubDir) === '' ) || ( $sSubDir === '.' )) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sPath .= $sSubDir . DIRECTORY_SEPARATOR;
|
||||
if (!is_dir($sPath)) {
|
||||
var_dump($sPath);
|
||||
@mkdir($sPath);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function RecurseCopy($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
@mkdir($dst);
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
$this->RecurseCopy($src . DIRECTORY_SEPARATOR . $file,$dst . DIRECTORY_SEPARATOR . $file);
|
||||
}
|
||||
else {
|
||||
copy($src . DIRECTORY_SEPARATOR . $file,$dst . DIRECTORY_SEPARATOR . $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
@@ -27,13 +27,13 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
$this->oCompileCSSServiceMock = $this->createMock('CompileCSSService');
|
||||
ThemeHandler::mockCompileCSSService($this->oCompileCSSServiceMock);
|
||||
|
||||
$this->sTmpDir = $this->tmpdir();
|
||||
$this->sTmpDir = $this->CreateTmpdir();
|
||||
$this->aDirsToCleanup[] = $this->sTmpDir;
|
||||
|
||||
$this->recurseMkdir($this->sTmpDir."/branding/themes/basque-red");
|
||||
$this->sCssPath = $this->sTmpDir.'/branding/themes/basque-red/main.css';
|
||||
$this->sJsonThemeParamFile = $this->sTmpDir.'/branding/themes/basque-red/theme-parameters.json';
|
||||
$this->recurse_copy(APPROOT."/test/application/theme-handler/expected/css", $this->sTmpDir."/branding/css");
|
||||
$this->RecurseCopy(APPROOT."/test/application/theme-handler/expected/css", $this->sTmpDir."/branding/css");
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
@@ -43,56 +43,10 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
foreach ($this->aDirsToCleanup as $sDir)
|
||||
{
|
||||
echo $sDir;
|
||||
$this->rrmdir($sDir);
|
||||
$this->RecurseRmdir($sDir);
|
||||
}
|
||||
}
|
||||
|
||||
function rrmdir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
if (is_dir($dir."/".$object))
|
||||
$this->rrmdir($dir."/".$object);
|
||||
else
|
||||
unlink($dir."/".$object);
|
||||
}
|
||||
}
|
||||
rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
function tmpdir() {
|
||||
$sTmpfile=tempnam(sys_get_temp_dir(),'');
|
||||
if (file_exists($sTmpfile))
|
||||
{
|
||||
unlink($sTmpfile);
|
||||
}
|
||||
mkdir($sTmpfile);
|
||||
if (is_dir($sTmpfile))
|
||||
{
|
||||
return $sTmpfile;
|
||||
}
|
||||
|
||||
return sys_get_temp_dir();
|
||||
}
|
||||
|
||||
public function recurse_copy($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
@mkdir($dst);
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
$this->recurse_copy($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
else {
|
||||
copy($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test used to be notified by CI when precompiled styles are not up to date anymore in code repository.
|
||||
*
|
||||
@@ -107,7 +61,7 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
public function testValidatePrecompiledStyles()
|
||||
{
|
||||
$aErrors = [];
|
||||
$aDataModelFiles=glob(dirname(__FILE__)."/../../datamodels/2.x/**/datamodel*.xml");
|
||||
$aDataModelFiles=glob(APPROOT . utils::GetConfig()->Get('source_dir'). "/**/datamodel*.xml");
|
||||
$aImportsPaths = [APPROOT.'datamodels'];
|
||||
|
||||
foreach ($aDataModelFiles as $sXmlDataCustoFilePath)
|
||||
@@ -135,7 +89,7 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
$sThemeId = $oTheme->getAttribute('id');
|
||||
|
||||
//echo "=== theme: $sThemeId ===\n";
|
||||
$sPrecompiledFilePath = dirname(__FILE__)."/../../datamodels/2.x/".$sPrecompiledStylesheetUri;
|
||||
$sPrecompiledFilePath = $sSourceDir = APPROOT . utils::GetConfig()->Get('source_dir') . $sPrecompiledStylesheetUri;
|
||||
$sPreCompiledSig = ThemeHandler::GetSignature($sPrecompiledFilePath);
|
||||
if (empty(trim($sPreCompiledSig))){
|
||||
var_dump("$sThemeId: $sPrecompiledFilePath => " . realpath($sPrecompiledFilePath));
|
||||
@@ -148,12 +102,12 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
continue;
|
||||
}
|
||||
|
||||
$aThemeParameters = [
|
||||
'variables' => [],
|
||||
'imports_utility' => [],
|
||||
'stylesheets' => [],
|
||||
'precompiled_stylesheet' => $sPrecompiledStylesheetUri,
|
||||
];
|
||||
$aThemeParameters = array(
|
||||
'variables' => array(),
|
||||
'variable_imports' => array(),
|
||||
'utility_imports' => array(),
|
||||
'stylesheets' => array(),
|
||||
);
|
||||
|
||||
/** @var \DOMNodeList $oVariables */
|
||||
$oVariables = $oTheme->GetNodes('variables/variable');
|
||||
@@ -170,8 +124,13 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
foreach ($oImports as $oImport)
|
||||
{
|
||||
$sImportId = $oImport->getAttribute('id');
|
||||
$aThemeParameters['imports_utility'][$sImportId] = $oImport->GetText();
|
||||
ThemeHandler::FindStylesheetFile($oImport->GetText(), $aImportsPaths, $oFindStylesheetObject);
|
||||
|
||||
if($oImport->getAttribute('xsi:type') === 'variables'){
|
||||
$aThemeParameters['variable_imports'][$sImportId] = $oImport->GetText();
|
||||
} else {
|
||||
$aThemeParameters['utility_imports'][$sImportId] = $oImport->GetText();
|
||||
ThemeHandler::FindStylesheetFile($oImport->GetText(), $aImportsPaths, $oFindStylesheetObject);
|
||||
}
|
||||
}
|
||||
|
||||
/** @var \DOMNodeList $oStylesheets */
|
||||
@@ -238,7 +197,7 @@ class ThemeHandlerTest extends ItopTestCase
|
||||
{
|
||||
$sSig = ThemeHandler::GetSignature(APPROOT.'test/application/theme-handler/expected/themes/basque-red/main.css');
|
||||
$sExpectedSig=<<<JSON
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"3c3f5adf98b9dbf893658314436c4b93","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"}}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":{"css-variables":"3c3f5adf98b9dbf893658314436c4b93"},"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"},"utility_imports":[]}
|
||||
JSON;
|
||||
|
||||
$this->assertEquals($sExpectedSig, $sSig);
|
||||
@@ -247,7 +206,7 @@ JSON;
|
||||
public function testGetVarSignature()
|
||||
{
|
||||
$sSignature=<<<JSON
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"934888ebb4991d4c76555be6b6d1d5cc","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[]}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"934888ebb4991d4c76555be6b6d1d5cc","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":[],"utility_imports":[]}
|
||||
JSON;
|
||||
$var_sig = ThemeHandler::GetVarSignature($sSignature);
|
||||
|
||||
@@ -322,9 +281,9 @@ JSON;
|
||||
|
||||
public function CompileThemesProviderEmptyArray()
|
||||
{
|
||||
$aEmptyImports = '{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports_utility":[],"imports_variable":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}';
|
||||
$aEmptyStyleSheets='{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports_utility":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"imports_variable":[],"stylesheets":[]}';
|
||||
$aEmptyVars='{"variables":[],"imports_utility":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"imports_variable":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}';
|
||||
$aEmptyImports = '{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"utility_imports":[],"variable_imports":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}';
|
||||
$aEmptyStyleSheets='{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"utility_imports":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"variable_imports":[],"stylesheets":[]}';
|
||||
$aEmptyVars='{"variables":[],"utility_imports":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"variable_imports":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}';
|
||||
return [
|
||||
"empty imports" => [$aEmptyImports],
|
||||
"empty styles" => [$aEmptyStyleSheets],
|
||||
@@ -337,8 +296,8 @@ JSON;
|
||||
*/
|
||||
public function CompileThemesProvider()
|
||||
{
|
||||
$sModifiedVariableThemeParameterJson='{"variables":{"brand-primary1":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports_utility":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"imports_variable":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}';
|
||||
$sInitialThemeParamJson='{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports_utility":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"imports_variable":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}';
|
||||
$sModifiedVariableThemeParameterJson='{"variables":{"brand-primary1":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"variable_imports":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"},"utility_imports":[]}';
|
||||
$sInitialThemeParamJson='{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"variable_imports":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"},"utility_imports":[]}';
|
||||
$sImportFilePath = '/branding/css/DO_NOT_CHANGE.css-variables.scss';
|
||||
$sVarChangedMainCssPath="test/application/theme-handler/expected/themes/basque-red/main_varchanged.css";
|
||||
$sStylesheetMainCssPath="test/application/theme-handler/expected/themes/basque-red/main_stylesheet.css";
|
||||
@@ -393,7 +352,7 @@ JSON;
|
||||
$sAbsoluteImagePath = APPROOT.'test/application/theme-handler/copied/testimages/';
|
||||
$this->recurseMkdir($sAbsoluteImagePath);
|
||||
$this->aDirsToCleanup[] = dirname($sAbsoluteImagePath);
|
||||
$this->recurse_copy(APPROOT.'test/application/theme-handler/expected/testimages/', $sAbsoluteImagePath);
|
||||
$this->RecurseCopy(APPROOT.'test/application/theme-handler/expected/testimages/', $sAbsoluteImagePath);
|
||||
|
||||
//change approot-relative in css-variable to use absolute path
|
||||
$sCssVarPath = $this->sTmpDir."/branding/css/DO_NOT_CHANGE.css-variables.scss";
|
||||
@@ -453,7 +412,7 @@ JSON;
|
||||
->willReturn("====CSSCOMPILEDCONTENT====");
|
||||
|
||||
$aThemeParameters = json_decode($ThemeParametersJson, true);
|
||||
$this->assertEquals($iCompileCSSFromSASSCount!=0,ThemeHandler::CompileTheme('basque-red', $bSetup, "COMPILATIONTIMESTAMP", $aThemeParameters, [$this->sTmpDir.'/branding/themes/'], $this->sTmpDir));
|
||||
$this->assertEquals($iCompileCSSFromSASSCount!=0, ThemeHandler::CompileTheme('basque-red', $bSetup, "COMPILATIONTIMESTAMP", $aThemeParameters, [$this->sTmpDir.'/branding/themes/'], $this->sTmpDir));
|
||||
|
||||
if ($iCompileCSSFromSASSCount==1)
|
||||
{
|
||||
@@ -566,6 +525,46 @@ SCSS;
|
||||
$this->assertEquals(['gray-darker', 'brand-primary', 'brand-primary-lightest'], $aMissingVariables);
|
||||
}
|
||||
|
||||
public function testGetVariablesFromFile(){
|
||||
$sContent = <<< 'SCSS'
|
||||
$approot-relative: "../../../../../" !default; // relative to env-***/branding/themes/***/main.css
|
||||
$approot-relative2: "../../" !default; // relative to env-***/branding/themes/***/main.css
|
||||
$approot-relative3: '../../' ; // relative to env-***/branding/themes/***/main.css
|
||||
$gray-base: #000 !default;
|
||||
$gray-darker: lighten($gray-base, 13.5%) !default; // #222
|
||||
$brand-primary: $combodo-orange !default;
|
||||
$brand-primary-lightest: lighten($brand-primary, 15%) !default;
|
||||
$content-color: #eeeeee !default;
|
||||
$default-font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif !default;
|
||||
$icons-filter: hue-rotate(0deg) !default;
|
||||
$toto : titi;
|
||||
SCSS;
|
||||
|
||||
file_put_contents($this->sTmpDir . DIRECTORY_SEPARATOR . 'css-variable.scss', $sContent);
|
||||
$aVariables = ThemeHandler::GetVariablesFromFile(
|
||||
[ 'css-variable.scss' ],
|
||||
[ $this->sTmpDir ]
|
||||
);
|
||||
|
||||
$aExpectedVariables = [
|
||||
'approot-relative' => '../../../../../',
|
||||
'approot-relative2' => '../../',
|
||||
'approot-relative3' => '../../',
|
||||
'gray-base' => '#000',
|
||||
'gray-darker' => 'lighten($gray-base, 13.5%)',
|
||||
'brand-primary' => '$combodo-orange',
|
||||
'brand-primary-lightest' => 'lighten($brand-primary, 15%)',
|
||||
'content-color' => '#eeeeee',
|
||||
'default-font-family' => 'Trebuchet MS,Tahoma,Verdana,Arial,sans-serif',
|
||||
'icons-filter' => 'hue-rotate(0deg)',
|
||||
'toto' => 'titi',
|
||||
];
|
||||
|
||||
$this->assertEquals(
|
||||
$aExpectedVariables,
|
||||
$aVariables);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sUrlTemplate
|
||||
* @param $aFoundVariables
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
=== SIGNATURE BEGIN ===
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"3c3f5adf98b9dbf893658314436c4b93","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"}}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":{"css-variables":"3c3f5adf98b9dbf893658314436c4b93"},"images":{"css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","images\/calendar.png":"ab56e59af3c96ca661821257d376465e","images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","images\/delete.png":"93c047549c31a270a037840277cf59d3","images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5"},"utility_imports":[]}
|
||||
=== SIGNATURE END ===
|
||||
*/
|
||||
====CSSCOMPILEDCONTENT====
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
=== SIGNATURE BEGIN ===
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"MD5SUM","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"06886d405efe86b85023ef64c4349095","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":{"css-variables":"MD5SUM"},"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"06886d405efe86b85023ef64c4349095","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"},"utility_imports":[]}
|
||||
=== SIGNATURE END ===
|
||||
*/
|
||||
====CSSCOMPILEDCONTENT====
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
=== SIGNATURE BEGIN ===
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"MD5SUM","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":{"css-variables":"MD5SUM"},"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"},"utility_imports":[]}
|
||||
=== SIGNATURE END ===
|
||||
*/
|
||||
====CSSCOMPILEDCONTENT====
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
=== SIGNATURE BEGIN ===
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"MD5SUM","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"63ba7dfe2a2eba40c2596ebb2a405f0b"},"imports":[],"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"63ba7dfe2a2eba40c2596ebb2a405f0b"},"variable_imports":{"css-variables":"MD5SUM"},"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"},"utility_imports":[]}
|
||||
=== SIGNATURE END ===
|
||||
*/
|
||||
====CSSCOMPILEDCONTENT====
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
=== SIGNATURE BEGIN ===
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"MD5SUM","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}}
|
||||
{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":{"css-variables":"MD5SUM"},"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"},"utility_imports":[]}
|
||||
=== SIGNATURE END ===
|
||||
*/
|
||||
====CSSCOMPILEDCONTENT====
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
=== SIGNATURE BEGIN ===
|
||||
{"variables":"8100523d2e76a70266f3e7110e2fe5fb","stylesheets":{"css-variables":"MD5SUM","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}}
|
||||
{"variables":"8100523d2e76a70266f3e7110e2fe5fb","stylesheets":{"jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"variable_imports":{"css-variables":"MD5SUM"},"images":{"test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"},"utility_imports":[]}
|
||||
=== SIGNATURE END ===
|
||||
*/
|
||||
====CSSCOMPILEDCONTENT====
|
||||
@@ -1 +1 @@
|
||||
{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports_utility":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"imports_variable":[],"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}
|
||||
{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"utility_imports":[],"variable_imports":{"css-variables":"..\/css\/DO_NOT_CHANGE.css-variables.scss"},"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/DO_NOT_CHANGE.jqueryui.scss","main":"..\/css\/DO_NOT_CHANGE.light-grey.scss"}}
|
||||
@@ -18,12 +18,21 @@ class MFCompilerTest extends ItopTestCase {
|
||||
/** @var \MFCompiler */
|
||||
private $oMFCompiler;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
private $sTmpDir;
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
require_once(APPROOT.'setup/compiler.class.inc.php');
|
||||
require_once(APPROOT.'setup/modelfactory.class.inc.php');
|
||||
require_once(__DIR__.'/SubMFCompiler.php');
|
||||
|
||||
$this->oMFCompiler = new MFCompiler($this->createMock(\ModelFactory::class), '');
|
||||
$this->sTmpDir = $this->CreateTmpdir();
|
||||
$this->oMFCompiler = new SubMFCompiler($this->createMock(\ModelFactory::class), '');
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
$this->RecurseRmdir($this->sTmpDir);
|
||||
}
|
||||
|
||||
public static function Init(){
|
||||
@@ -104,7 +113,10 @@ class MFCompilerTest extends ItopTestCase {
|
||||
* @param string $sThemeDir
|
||||
* @param ?string $sExpectedReturn
|
||||
*/
|
||||
public function testUseLatestPrecompiledFile(string $sTempTargetDir, string $sPrecompiledFileUri, string $sPostCompilationLatestPrecompiledFile, string $sThemeDir, ?string $sExpectedReturn){
|
||||
public function testUseLatestPrecompiledFile(string $sTempTargetDir, string $sPrecompiledFileUri, string $sPostCompilationLatestPrecompiledFile, string $sThemeDir, ?string $sExpectedReturn, bool $bDisableThemePrecompilationViaConf = false){
|
||||
if ($bDisableThemePrecompilationViaConf){
|
||||
utils::GetConfig()->Set('theme.enable_precompilation', false);
|
||||
}
|
||||
$sRes = $this->oMFCompiler->UseLatestPrecompiledFile($sTempTargetDir, $sPrecompiledFileUri, $sPostCompilationLatestPrecompiledFile, $sThemeDir);
|
||||
$this->assertEquals($sExpectedReturn, $sRes);
|
||||
}
|
||||
@@ -113,6 +125,7 @@ class MFCompilerTest extends ItopTestCase {
|
||||
self::init();
|
||||
return [
|
||||
'no precompiled file at all' => $this->BuildProviderUseCaseArray('', self::$aRessources['sMissingFile'], null),
|
||||
'deactivate precompilation via conf' => $this->BuildProviderUseCaseArray('', self::$aRessources['sPostCompilation1'], null, true),
|
||||
'no precompiled file configured in precompiled_stylesheet XM section' => $this->BuildProviderUseCaseArray('', self::$aRessources['sPostCompilation1'], self::$aRessources['sPostCompilation1']),
|
||||
'missing precompiled file in precompiled_stylesheet section' => $this->BuildProviderUseCaseArray(self::$aRessources['sMissingFile'], self::$aRessources['sPostCompilation1'], self::$aRessources['sPostCompilation1'] ),
|
||||
'no precompiled file generated in previous setup in /data/precompiled_styles' => $this->BuildProviderUseCaseArray(self::$aRessources['sPrecompiledInExtensionFileUri1'], self::$aRessources['sMissingFile'], self::$aRessources['sCopiedExtensionFile1'] ),
|
||||
@@ -123,15 +136,57 @@ class MFCompilerTest extends ItopTestCase {
|
||||
];
|
||||
}
|
||||
|
||||
private function BuildProviderUseCaseArray(string $sPrecompiledFileUri, string $sPostCompilationLatestPrecompiledFile, $sExpectedReturn) : array{
|
||||
private function BuildProviderUseCaseArray(string $sPrecompiledFileUri, string $sPostCompilationLatestPrecompiledFile, $sExpectedReturn, $bDisableThemePrecompilationViaConf = false) : array{
|
||||
return [
|
||||
"sTempTargetDir" => sys_get_temp_dir(),
|
||||
"sPrecompiledFileUri" => $sPrecompiledFileUri,
|
||||
"sPostCompilationLatestPrecompiledFile" => $sPostCompilationLatestPrecompiledFile,
|
||||
"sThemeDir" => "test",
|
||||
"sExpectedReturn" => $sExpectedReturn
|
||||
"sExpectedReturn" => $sExpectedReturn,
|
||||
"bDisableThemePrecompilationViaConf" => $bDisableThemePrecompilationViaConf
|
||||
];
|
||||
}
|
||||
|
||||
public function testCompileThemes(){
|
||||
$sXmlDataCustoFilePath = realpath(__DIR__ . '/ressources/datamodels/datamodel-branding.xml');
|
||||
$oDom = new MFDocument();
|
||||
$oDom->load($sXmlDataCustoFilePath);
|
||||
|
||||
/** @var \MFElement $oBrandingNode */
|
||||
$oBrandingNode = $oDom->GetNodes('branding')->item(0);
|
||||
|
||||
$this->RecurseMkdir($this->sTmpDir.'/branding/themes/fullmoon/');
|
||||
file_put_contents($this->sTmpDir.'/branding/themes/fullmoon/main.css', "");
|
||||
|
||||
$aImportsPaths = array(
|
||||
APPROOT.'css/',
|
||||
APPROOT.'css/backoffice/main.scss',
|
||||
$this->sTmpDir.'//',
|
||||
);
|
||||
|
||||
|
||||
$aThemeParameters = [
|
||||
'variables' => [
|
||||
'ibo-page-banner--background-color' => '$ibo-color-red-600',
|
||||
'ibo-page-banner--text-color' => '$ibo-color-red-100',
|
||||
'ibo-page-banner--text-content' => '"THIS IS A TEST INSTANCE"',
|
||||
],
|
||||
'variable_imports' => [ 'style2' => 'style2.scss'],
|
||||
'utility_imports' => [ 'style1' => 'style1.scss', 'style3' => 'style3.scss'],
|
||||
'stylesheets' => [
|
||||
"fullmoon" => '../css/backoffice/main.scss',
|
||||
"environment-banner" => '../css/backoffice/themes/page-banner.scss'
|
||||
],
|
||||
];
|
||||
|
||||
$oThemeHandlerService = $this->createMock(\ThemeHandlerService::class);
|
||||
$oThemeHandlerService->expects($this->exactly(1))
|
||||
->method("CompileTheme")
|
||||
->with("fullmoon", true, $this->oMFCompiler->GetCompilationTimeStamp(), $aThemeParameters, $aImportsPaths, $this->sTmpDir . '/');
|
||||
|
||||
|
||||
//CompileTheme($sThemeId, $bSetup = false, $sSetupCompilationTimestamp="", $aThemeParameters = null, $aImportsPaths = null, $sWorkingPath = null)
|
||||
MFCompiler::SetThemeHandlerService($oThemeHandlerService);
|
||||
$this->oMFCompiler->CompileThemes($oBrandingNode, $this->sTmpDir);
|
||||
}
|
||||
}
|
||||
|
||||
14
test/setup/SubMFCompiler.php
Normal file
14
test/setup/SubMFCompiler.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class SubMFCompiler: used to call a protected method for testing purpose
|
||||
*/
|
||||
class SubMFCompiler extends MFCompiler {
|
||||
public function CompileThemes($oBrandingNode, $sTempTargetDir) {
|
||||
return parent::CompileThemes($oBrandingNode, $sTempTargetDir);
|
||||
}
|
||||
|
||||
public function GetCompilationTimeStamp(){
|
||||
return $this->sCompilationTimeStamp;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
<variable id="var1">#C53030</variable>
|
||||
</variables>
|
||||
<imports>
|
||||
<import id="scss-variables" xsi:type="utility">../css/scss-variables.scss</import>
|
||||
<import id="scss-variables" xsi:type="utilities">../css/scss-variables.scss</import>
|
||||
</imports>
|
||||
<stylesheets>
|
||||
<stylesheet id="custom">../css/custom.scss</stylesheet>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<variable id="var1">#C53030</variable>
|
||||
</variables>
|
||||
<imports>
|
||||
<import id="scss-variables" xsi:type="utility">../css/scss-variables.scss</import>
|
||||
<import id="scss-variables" xsi:type="utilities">../css/scss-variables.scss</import>
|
||||
</imports>
|
||||
<stylesheets>
|
||||
<stylesheet id="custom">../css/custom.scss</stylesheet>
|
||||
|
||||
24
test/setup/ressources/datamodels/datamodel-branding.xml
Normal file
24
test/setup/ressources/datamodels/datamodel-branding.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0">
|
||||
<branding>
|
||||
<themes>
|
||||
<theme id="fullmoon" _delta="define">
|
||||
<variables>
|
||||
<variable id="ibo-page-banner--background-color">$ibo-color-red-600</variable>
|
||||
<variable id="ibo-page-banner--text-color">$ibo-color-red-100</variable>
|
||||
<variable id="ibo-page-banner--text-content">"THIS IS A TEST INSTANCE"</variable>
|
||||
</variables>
|
||||
<imports>
|
||||
<import id="style1">style1.scss</import>
|
||||
<import id="style2" xsi:type="variables">style2.scss</import>
|
||||
<import id="style3" xsi:type="utilities">style3.scss</import>
|
||||
</imports>
|
||||
<stylesheets>
|
||||
<stylesheet id="fullmoon">../css/backoffice/main.scss</stylesheet>
|
||||
<stylesheet id="environment-banner">../css/backoffice/themes/page-banner.scss</stylesheet>
|
||||
</stylesheets>
|
||||
<precompiled_stylesheet>itop-structure/precompiled-themes/test-red/main.css</precompiled_stylesheet>
|
||||
</theme>
|
||||
</themes>
|
||||
</branding>
|
||||
</itop_design>
|
||||
Reference in New Issue
Block a user