/** * @expectedException \Exception * @expectedExceptionMessage Collection Structure does not contain field fieldName */ public function testGetValueWithException() { $this->assertEquals(['item1', 'item2', 'item3'], $this->recordCollection->getValue('fieldName')); }