/** * @expectedException InvalidArgumentException */ public function testGetOptionFails() { $this->field->shouldReceive('getOptions')->once()->andReturn(array('field_name' => 'bar')); $this->field->getOption('foo'); }
/** * @expectedException InvalidArgumentException */ public function testGetOptionThrowsException() { $this->config->shouldReceive('getOptions')->once()->andReturn(array('name' => 'model_name')); $this->config->getOption('foo'); }