Exemplo n.º 1
0
 /**
  * @covers generateCss
  */
 public function testGenerateCss()
 {
     $env = new ILess_Environment();
     $output = new ILess_Output();
     $r = new ILess_Node_Rule('foobar', new ILess_Node_Anonymous('yellow'));
     $r->generateCss($env, $output);
     $this->assertEquals('foobar: yellow;', $output->toString());
 }
Exemplo n.º 2
0
 /**
  * @covers generateCss
  */
 public function testGenerateCss()
 {
     $env = new ILess_Environment();
     $output = new ILess_Output();
     $r = new ILess_Node_Ruleset(array(new ILess_Node_Selector(array(new ILess_Node_Element('', 'div')))), array(new ILess_Node_Rule('color', new ILess_Node_Color('#fff')), new ILess_Node_Rule('font-weight', new ILess_Node_Keyword('bold'))));
     // $r->debugInfo = new ILess_DebugInfo('foo', 1);
     $args = new ILess_Visitor_Arguments(array('visitDeeper' => true));
     $visitor = new ILess_Visitor_JoinSelector();
     $visitor->visitRuleset($r, $args);
     $n = new ILess_Node_Rule('font-weight', new ILess_Node_Keyword('bold'));
     $n->generateCss($env, $output);
     $this->assertEquals('font-weight: bold;', $output->toString());
     $output = new ILess_Output();
     $r->generateCss($env, $output);
     $this->assertEquals("div {\n  color: #ffffff;\n  font-weight: bold;\n}", $output->toString());
 }