Beispiel #1
0
 protected function setUp()
 {
     Tag::$codeFormat = false;
 }
Beispiel #2
0
 protected function setUp()
 {
     Tag::$codeFormat = false;
     $this->nodes = new TagNodes();
 }
Beispiel #3
0
 public function testCodeFormat()
 {
     Tag::$codeFormat = true;
     $this->assertEquals((string) Tag::div()->addClass('span1'), '<div class="span1">' . PHP_EOL . '</div>' . PHP_EOL);
     $this->assertEquals((string) Tag::div('contents')->addClass('span1'), '<div class="span1">' . PHP_EOL . '  contents' . PHP_EOL . '</div>' . PHP_EOL);
     $this->assertEquals((string) Tag::br(), '<br>' . PHP_EOL);
     $this->assertEquals((string) Tag::div('contents'), '<div>' . PHP_EOL . '  contents' . PHP_EOL . '</div>' . PHP_EOL);
     $this->assertEquals((string) Tag::div(Tag::div(Tag::span('content'))), '<div>' . PHP_EOL . '  <div>' . PHP_EOL . '    <span>content</span>' . PHP_EOL . '  </div>' . PHP_EOL . '</div>' . PHP_EOL);
     $this->assertEquals((string) Tag::span(Tag::span(), Tag::span()), '<span><span></span><span></span></span>' . PHP_EOL);
 }