Ejemplo n.º 1
0
 /**
  * toString
  *
  * @param boolean $forcePair
  *
  * @return  string
  */
 public function toString($forcePair = false)
 {
     return DomBuilder::create($this->name, $this->content, $this->attribs, $forcePair);
 }
Ejemplo n.º 2
0
 /**
  * Method to test quote().
  *
  * @return void
  *
  * @covers Windwalker\Dom\Builder\DomBuilder::quote
  */
 public function testQuote()
 {
     $this->assertEquals('"foo"', DomBuilder::quote('foo'));
 }
Ejemplo n.º 3
0
 /**
  * testPrepareAttributes
  *
  * @return  void
  *
  * @covers Windwalker\Dom\Builder\DomBuilder::buildAttributes
  */
 public function testBuildAttributes()
 {
     $attrs = array('foo' => 'bar', 'data' => true, 'bar' => false, 'empty' => '', 'selected' => true, 'checked' => false);
     $this->assertEquals(' foo="bar" data empty="" selected', DomBuilder::buildAttributes($attrs));
 }