public function testGetOptions()
 {
     $defaults = array('title' => 'Custom Action', 'has_permission' => true, 'confirmation' => false, 'messages' => array('active' => 'Just a moment...', 'success' => 'Success!', 'error' => 'There was an error performing this action'));
     $defaults['action_name'] = 'test';
     $this->action->shouldReceive('validateOptions')->once()->shouldReceive('build')->once();
     $this->assertEquals($this->action->getOptions(), $defaults);
 }
Exemplo n.º 2
0
 public function testGetOptions()
 {
     $this->field->shouldReceive('validateOptions')->once()->shouldReceive('build')->once()->shouldReceive('getDefaults')->once()->andReturn(array('foo' => 'bar'));
     $this->assertEquals($this->field->getOptions(), array('foo' => 'bar', 'field_name' => 'field', 'type' => 'text'));
 }
 public function testGetOptions()
 {
     $this->config->shouldReceive('validateOptions')->once()->shouldReceive('build')->once();
     $this->assertEquals($this->config->getOptions(), array('name' => 'model_name'));
 }