Esempio n. 1
0
 public function testCloseTags()
 {
     $result = Selecta::close('ul li');
     $this->assertEquals('</li></ul>', $result);
 }
Esempio n. 2
0
 public function testSimpleTagWithContent()
 {
     $result = Selecta::wrap('div', 'Hello');
     $this->assertEquals('<div>Hello</div>', $result);
 }
Esempio n. 3
0
 public function testIdAndClass()
 {
     $result = Selecta::build('div#foo.bar');
     $this->assertEquals('<div id="foo" class="bar"></div>', $result);
 }
Esempio n. 4
0
 public function testDisabledSelector()
 {
     $result = Selecta::build('input[type=text]:disabled');
     $this->assertEquals('<input type="text" disabled>', $result);
 }
Esempio n. 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);
 }
Esempio n. 6
0
 public function testDoubleClass()
 {
     $result = Selecta::build('div.foo.bar');
     $this->assertEquals('<div class="foo bar"></div>', $result);
 }