Source of file AtRuleBlockListTest.php
Size: 0,968 Bytes - Last Modified: 2021-12-23T10:11:59+00:00
/var/www/docs.ssmods.com/process/src/ext/sabberworm/php-css-parser/tests/Sabberworm/CSS/CSSList/AtRuleBlockListTest.php
12345678910111213141516171819202122232425262728 | <?php namespace Sabberworm\CSS\CSSList; use Sabberworm\CSS\Parser; class AtRuleBlockListTest extends \PHPUnit_Framework_TestCase { public function testMediaQueries() { $sCss = '@media(min-width: 768px){.class{color:red}}'; $oParser = new Parser($sCss); $oDoc = $oParser->parse(); $aContents = $oDoc->getContents(); $oMediaQuery = $aContents[0]; $this->assertSame('media', $oMediaQuery->atRuleName(), 'Does not interpret the type as a function'); $this->assertSame('(min-width: 768px)', $oMediaQuery->atRuleArgs(), 'The media query is the value'); $sCss = '@media (min-width: 768px) {.class{color:red}}'; $oParser = new Parser($sCss); $oDoc = $oParser->parse(); $aContents = $oDoc->getContents(); $oMediaQuery = $aContents[0]; $this->assertSame('media', $oMediaQuery->atRuleName(), 'Does not interpret the type as a function'); $this->assertSame('(min-width: 768px)', $oMediaQuery->atRuleArgs(), 'The media query is the value'); } } |