/** * @expectedException Sonata\AdminBundle\Exception\NoValueException */ public function testGetValueNoValueException() { $description = new FieldDescription(); $mock = $this->getMock('stdClass', array('getFoo')); $description->getFieldValue($mock, 'fake'); }