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