File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
tests/Sabberworm/CSS/CSSList Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Sabberworm \CSS \CSSList ;
4
+
5
+ use Sabberworm \CSS \Parser ;
6
+
7
+ class AtRuleBlockListTest extends \PHPUnit_Framework_TestCase {
8
+
9
+ public function testMediaQueries () {
10
+ $ sCss = '@media(min-width: 768px){.class{color:red}} ' ;
11
+ $ oParser = new Parser ($ sCss );
12
+ $ oDoc = $ oParser ->parse ();
13
+ $ aContents = $ oDoc ->getContents ();
14
+ $ oMediaQuery = $ aContents [0 ];
15
+ $ this ->assertSame ('media ' , $ oMediaQuery ->atRuleName (), 'Does not interpret the type as a function ' );
16
+ $ this ->assertSame ('(min-width: 768px) ' , $ oMediaQuery ->atRuleArgs (), 'The media query is the value ' );
17
+
18
+ $ sCss = '@media (min-width: 768px) {.class{color:red}} ' ;
19
+ $ oParser = new Parser ($ sCss );
20
+ $ oDoc = $ oParser ->parse ();
21
+ $ aContents = $ oDoc ->getContents ();
22
+ $ oMediaQuery = $ aContents [0 ];
23
+ $ this ->assertSame ('media ' , $ oMediaQuery ->atRuleName (), 'Does not interpret the type as a function ' );
24
+ $ this ->assertSame ('(min-width: 768px) ' , $ oMediaQuery ->atRuleArgs (), 'The media query is the value ' );
25
+ }
26
+
27
+ }
You can’t perform that action at this time.
0 commit comments