public function testFind_atrule() { $string = '@constants{property:value;property:value;}'; $expected = array(0 => array(0 => '@constants{property:value;property:value;}', 1 => '', 2 => 'property:value;property:value;')); $actual = Scaffold_Helper_CSS::find_atrule('constants', $string); $this->assertEquals($expected, $actual); }
/** * Removes the @constant rules from a CSS string * @access public * @param $css * @return string */ public function remove_constant_rules($css) { $rules = Scaffold_Helper_CSS::find_atrule('constants', $css); foreach ($rules as $rule) { $css = str_replace($rule[0], '', $css); } return $css; }