/** * {@inheritdoc} */ public function offsetGet($offset) { return $this->converter->convertToDocument($this->raw['hits'][$offset]); }
/** * Tests if ConvertToDocument() throws Exception. * * @expectedException \LogicException * @expectedExceptionMessage Got document of unknown type 'foo'. */ public function testConvertToDocumentException() { $converter = new Converter([], []); $converter->convertToDocument(['_type' => 'foo']); }