public function testFeatureModelPrefill() { $rdr = new MockReader(); $model = new MgFeatureReaderModel(new MockFormatterSet(), $rdr, -1, 0); $this->assertTrue($model->Next()); $feat = $model->Current(); $feat->Prefill(); $rdr->Close(); //These should throw now try { $rdr->ReadNext(); } catch (Exception $ex) { } try { $model->Next(); } catch (Exception $ex) { } //But our feature's property values should not, as we've cached the underlying values //up-front with prefill $this->assertEquals(0, $feat->ID); }