File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 8
8
use Sabberworm \CSS \RuleSet \DeclarationBlock ;
9
9
use Sabberworm \CSS \Property \AtRule ;
10
10
use Sabberworm \CSS \Value \URL ;
11
+ use Sabberworm \CSS \Value \Color ;
11
12
12
13
class ParserTest extends \PHPUnit_Framework_TestCase {
13
14
@@ -471,6 +472,22 @@ function testLineNumbersParsing() {
471
472
$ aUrlActual [] = $ oValue ->getLineNo ();
472
473
}
473
474
}
475
+
476
+ // Checking for the multiline color rule lines 27-31
477
+ $ aExpectedColorLines = array (28 , 29 , 30 );
478
+ $ aDeclBlocks = $ oDoc ->getAllDeclarationBlocks ();
479
+ // Choose the 2nd one
480
+ $ oDeclBlock = $ aDeclBlocks [1 ];
481
+ $ aRules = $ oDeclBlock ->getRules ();
482
+ // Choose the 2nd one
483
+ $ oColor = $ aRules [1 ]->getValue ();
484
+ $ this ->assertEquals ($ aRules [1 ]->getLineNo (), 27 );
485
+
486
+ foreach ($ oColor ->getColor () as $ oSize ) {
487
+ $ aActualColorLines [] = $ oSize ->getLineNo ();
488
+ }
489
+
490
+ $ this ->assertEquals ($ aExpectedColorLines , $ aActualColorLines );
474
491
$ this ->assertEquals ($ aUrlExpected , $ aUrlActual );
475
492
$ this ->assertEquals ($ aExpected , $ aActual );
476
493
}
Original file line number Diff line number Diff line change 24
24
25
25
body {
26
26
background : # FFFFFF url ("http://somesite.com/images/someimage.gif" ) repeat top center; /* line 25 */
27
- color : rgb (233 , 100 , 450 );
27
+ color : rgb ( /* line 27 */
28
+ 233 , /* line 28 */
29
+ 100 , /* line 29 */
30
+ 450 /* line 30 */
31
+ );
28
32
}
You can’t perform that action at this time.
0 commit comments