[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 class styleutils_cssstyleini_test extends DokuWikiTest { 4 5 function test_mergedstyleini() { 6 $util = new \dokuwiki\StyleUtils('dokuwiki', false, true); 7 8 $expected = array ( 9 'stylesheets' => 10 array ( 11 'screen' => 12 array ( 13 DOKU_CONF . 'tpl/dokuwiki/css/_tests.less' => '/./', 14 DOKU_INC . 'lib/tpl/dokuwiki/css/content.less' => '/./lib/tpl/dokuwiki/', 15 ), 16 ), 17 'replacements' => 18 array ( 19 '__text__' => '#333', 20 '__background__' => '#f2ecec', 21 '__custom_variable__' => '#5e4040', 22 '__custom_variable_two__' => 'url(' . DOKU_BASE . 'test/foo.png)', 23 ), 24 ); 25 26 $actual = $util->cssStyleini(); 27 28 // check that all stylesheet levels are present 29 $this->assertArrayHasKey('all', $actual['stylesheets']); 30 $this->assertArrayHasKey('print', $actual['stylesheets']); 31 32 // check an original stylesheet and an additional one 33 $this->assertEmpty( 34 array_diff_assoc($expected['stylesheets']['screen'], $actual['stylesheets']['screen']) 35 ); 36 37 // merged config has an original value (text), an overridden value (background) and a new custom replacement (custom_variable) 38 $this->assertEmpty( 39 array_diff_assoc($expected['replacements'], $actual['replacements']) 40 ); 41 } 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body