public function testHasSelector() { $this->driver->expects($this->exactly(2))->method('find')->with('//html/some xpath')->will($this->onConsecutiveCalls(array('id2', 'id3'), array())); $this->selectors->expects($this->exactly(2))->method('selectorToXpath')->with('xpath', 'some xpath')->will($this->returnValue('some xpath')); $this->assertTrue($this->document->has('xpath', 'some xpath')); $this->assertFalse($this->document->has('xpath', 'some xpath')); }