本文整理汇总了PHP中Mockery::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Mockery::getOptions方法的具体用法?PHP Mockery::getOptions怎么用?PHP Mockery::getOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mockery
的用法示例。
在下文中一共展示了Mockery::getOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetOptions
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);
}
示例2: testGetOptions
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'));
}
示例3: testGetOptions
public function testGetOptions()
{
$this->config->shouldReceive('validateOptions')->once()->shouldReceive('build')->once();
$this->assertEquals($this->config->getOptions(), array('name' => 'model_name'));
}