public function testFindAndGetWithFetchJsonSet() { $data = $this->_saveListData(); $mapper = new Mapper('\\Model\\Simple', Mapper::FETCH_JSON); $result = $mapper->find()->get(); $this->assertInternalType('string', $result); $result = json_decode($result); $current = current($result); $this->assertInternalType('array', $result); $this->assertInstanceOf('stdClass', $current); $this->assertAttributeNotEmpty('_id', $current); $this->assertCount(count($data), $result); $mapper = new Mapper('\\Model\\Simple'); $mapper->setFetchType(Mapper::FETCH_JSON); $result = $mapper->find()->get(); $this->assertInternalType('string', $result); $result = json_decode($result); $current = current($result); $this->assertInternalType('array', $result); $this->assertInstanceOf('stdClass', $current); $this->assertAttributeNotEmpty('_id', $current); $this->assertCount(count($data), $result); }