diff --git a/.travis.yml b/.travis.yml index 0cffa72e2a5..17e8212dcde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ before_script: - if [[ "$LDAP" == "true" ]]; then ./tests/LDAP/ldap_fixtures.sh > /dev/null; fi #APCu - phpenv config-add tests/enable-apcu.ini + - if [[ "$UPDATE" == "true" ]]; then ./vendor/bin/robo --load-from tools minify; fi script: - mysql -u root -e 'select version();' - if [[ "$UPDATE" == "true" ]]; then composer testdb; fi diff --git a/inc/config.class.php b/inc/config.class.php index 944bae673d9..3bbd3440ffa 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -1142,18 +1142,14 @@ function showFormUserPrefs($data = []) { echo ""; echo ""; - $themes_files = scandir(GLPI_ROOT."/css/palettes/"); - echo "', self::cleanInputText($name), diff --git a/tests/units/Config.php b/tests/units/Config.php index 0008332abc6..4e95d3156e0 100644 --- a/tests/units/Config.php +++ b/tests/units/Config.php @@ -393,4 +393,30 @@ public function testGetRights() { UPDATE => 'Update' ]); } + + public function testGetPalettes() { + $expected = [ + 'aerialgreen' => 'Aerialgreen', + 'auror' => 'Auror', + 'automn' => 'Automn', + 'classic' => 'Classic', + 'clockworkorange' => 'Clockworkorange', + 'dark' => 'Dark', + 'flood' => 'Flood', + 'greenflat' => 'Greenflat', + 'hipster' => 'Hipster', + 'icecream' => 'Icecream', + 'lightblue' => 'Lightblue', + 'premiumred' => 'Premiumred', + 'purplehaze' => 'Purplehaze', + 'teclib' => 'Teclib', + 'vintage' => 'Vintage' + ]; + $this + ->if($this->newTestedInstance) + ->then + ->array($this->testedInstance->getPalettes()) + ->isIdenticalTo($expected); + + } }