コード例 #1
0
ファイル: StackedTagTest.php プロジェクト: drewm/selecta
 public function testCloseTags()
 {
     $result = Selecta::close('ul li');
     $this->assertEquals('</li></ul>', $result);
 }
コード例 #2
0
ファイル: BasicTagTest.php プロジェクト: drewm/selecta
 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
ファイル: AttributeTest.php プロジェクト: drewm/selecta
 public function testDisabledSelector()
 {
     $result = Selecta::build('input[type=text]:disabled');
     $this->assertEquals('<input type="text" disabled>', $result);
 }
コード例 #5
0
ファイル: ExtremeTest.php プロジェクト: drewm/selecta
 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
ファイル: ClassTest.php プロジェクト: drewm/selecta
 public function testDoubleClass()
 {
     $result = Selecta::build('div.foo.bar');
     $this->assertEquals('<div class="foo bar"></div>', $result);
 }