public function testFindField() { $this->mockNamedFinder('//field', array('field1', 'field2', 'field3'), array('field', 'some field')); $this->assertEquals('field1', $this->document->findField('some field')); $this->assertEquals(null, $this->document->findField('some field')); }