test() public method

Tests the expectation. True if it matches the held value.
public test ( mixed $compare ) : boolean
$compare mixed Comparison value.
return boolean True if correct.
Beispiel #1
0
 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')));
 }