Example #1
0
 public function testCloseTags()
 {
     $result = Selecta::close('ul li');
     $this->assertEquals('</li></ul>', $result);
 }
Example #2
0
 public function testSimpleTagWithContent()
 {
     $result = Selecta::wrap('div', 'Hello');
     $this->assertEquals('<div>Hello</div>', $result);
 }
Example #3
0
 public function testIdAndClass()
 {
     $result = Selecta::build('div#foo.bar');
     $this->assertEquals('<div id="foo" class="bar"></div>', $result);
 }
Example #4
0
 public function testDisabledSelector()
 {
     $result = Selecta::build('input[type=text]:disabled');
     $this->assertEquals('<input type="text" disabled>', $result);
 }
Example #5
0
 public function testProblem1()
 {
     $result = Selecta::wrap('a[href=/content/page/templates/][title=My pages].tab-active', 'hello');
     $this->assertEquals('<a href="/content/page/templates/" title="My pages" class="tab-active">hello</a>', $result);
 }
Example #6
0
 public function testDoubleClass()
 {
     $result = Selecta::build('div.foo.bar');
     $this->assertEquals('<div class="foo bar"></div>', $result);
 }