public function LessUnitTest::test_less_output_path in Less CSS Preprocessor 8
Same name and namespace in other branches
- 7.4 tests/less.test \LessUnitTest::test_less_output_path()
Test the _less_output_path() function.
See also
File
- tests/
less.test, line 29
Class
Code
public function test_less_output_path() {
$less_item = array(
'less' => array(
'build_cache_id' => 'Zxz5NVNO0Ad9miD2JeGw1B_3auVKtmJJ7ksCdxaeZ0A',
'variables' => array(
'@gradient_end' => 'darken(@gradient_start, 10%);',
'@gradient_start' => '#0779bf;',
'@text_glow' => 'blue',
'@test' => 'green',
'@header_from' => 'test',
),
'functions' => array(
'token' => '_less_token_replace',
'swap' => '_less_demo_reverse',
),
'paths' => array(
0 => 'sites/all/modules/custom/less/less_demo/libs',
),
'less_autoprefixer' => TRUE,
'less_devel' => FALSE,
'less_source_maps' => FALSE,
'theme' => 'seven',
'output_file' => NULL,
'build_required' => NULL,
'input_file' => 'sites/all/modules/custom/less/less_demo/styles/less_demo.info.css.less',
),
);
_less_output_path($less_item, NULL);
$expected_output_file = 'public://less/less_demo.info.aIR_TiwEIzIVLaH9dWKmPfbShza_NoIVp_TPs0tPvaM.css';
$this
->assertIdentical($less_item['less']['output_file'], $expected_output_file, 'Output file location processes correctly.');
}