Create a CSS Selector expectactation
Inheritance: extends SimpleExpectation
コード例 #1
0
ファイル: dom_tester_test.php プロジェクト: ilune/simpletest
 public function testAdjacents()
 {
     $expectation = new CssSelectorExpectation($this->dom, 'p + p');
     $this->assertTrue($expectation->test(array('Second paragraph', 'Third paragraph')));
     $expectation = new CssSelectorExpectation($this->dom, 'body > p + p');
     $this->assertTrue($expectation->test(array('Second paragraph', 'Third paragraph')));
     $expectation = new CssSelectorExpectation($this->dom, 'body > p + p > a');
     $this->assertTrue($expectation->test(array('paragraph')));
 }
コード例 #2
0
ファイル: dom_tester.php プロジェクト: GerHobbelt/simpletest
 function getElementsBySelector($selector)
 {
     $this->loadDom();
     $css_selector = new CssSelectorExpectation($this->dom, $selector);
     return $css_selector->getValue();
 }