public function testIsSelected() { $node = new NodeElement('some_xpath', $this->session); $this->driver->expects($this->exactly(2))->method('isSelected')->with('some_xpath')->will($this->onConsecutiveCalls(true, false)); $this->assertTrue($node->isSelected()); $this->assertFalse($node->isSelected()); }