本文整理汇总了PHP中Illuminate\Html\FormBuilder::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::expects方法的具体用法?PHP FormBuilder::expects怎么用?PHP FormBuilder::expects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Html\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testElements
public function testElements()
{
$this->getApplicationMock()->expects($this->exactly(1))->method('make')->with('form')->will($this->returnValue($this->formBuilderMock));
$this->testInstance->setMeta($this->metaAttributesMock);
$this->metaAttributesMock->__value = uniqid();
$this->metaAttributesMock->setLocale('_');
$testMethods = ['open', 'select', 'close', 'submit', 'hidden', 'checkbox', 'radio', 'text', 'password', 'textarea'];
foreach ($testMethods as $testMethod) {
$this->formBuilderMock->expects($this->exactly(1))->method($testMethod);
}
$this->assertSame("<label>label</label>", (string) $this->testInstance->label('label'));
$this->testInstance->open();
$this->testInstance->close();
$this->testInstance->select('value');
$this->testInstance->submit('value');
$this->testInstance->hidden('value');
$this->testInstance->checkbox('value');
$this->testInstance->radio('value');
$this->testInstance->text('value');
$this->testInstance->textarea('value');
$this->testInstance->password('value');
}