"Fossies" - the Fresh Open Source Software Archive

Member "4.6.1/vendor/mishal-iless/tests/ILess/Test/Issues/050Test.php" (8 Apr 2021, 1169 Bytes) of package /linux/www/studip-4.6.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 
    3 /*
    4  * This file is part of the ILess
    5  *
    6  * For the full copyright and license information, please view the LICENSE
    7  * file that was distributed with this source code.
    8  */
    9 
   10 use ILess\Parser;
   11 
   12 /**
   13  * Issue #50 test
   14  *
   15  * @package ILess
   16  * @subpackage test
   17  */
   18 class ILess_Test_Issues_050Test extends Test_TestCase
   19 {
   20     public function testIssue()
   21     {
   22         $parser = new Parser([
   23             'compress' => false,
   24         ]);
   25 
   26         $parser->parseString('@swatch: foobar;
   27 @import "../../../bootstrap3/less/@{swatch}/variables.less";
   28 ');
   29 
   30         $this->setExpectedException('ILess\Exception\ImportException', '/bootstrap3/less/foobar/variables.less');
   31 
   32         $css = $parser->getCSS();
   33     }
   34 
   35     public function testIssueWithApiVariables()
   36     {
   37         $parser = new Parser([
   38             'compress' => false,
   39         ]);
   40 
   41         $parser->parseString('
   42 @import "../../../bootstrap3/less/@{swatch}/variables.less";
   43 ');
   44         $parser->setVariables([
   45             'swatch' => 'foobar',
   46         ]);
   47 
   48         $this->setExpectedException('ILess\Exception\ImportException', '/bootstrap3/less/foobar/variables.less');
   49 
   50         $css = $parser->getCSS();
   51     }
   52 
   53 }