コード例 #1
0
ファイル: FormBuilderTest.php プロジェクト: boyhagemann/form
 public function testViewCanBeClosure()
 {
     $this->events->shouldReceive('fire')->twice();
     $this->fb->view(function () {
         return 'test';
     });
     $this->assertSame('test', $this->fb->build());
 }
コード例 #2
0
 /**
  * @return \Symfony\Component\Form\Form
  */
 public function getForm($values = null)
 {
     if (!$values) {
         $values = Input::old();
     }
     $this->formBuilder->defaults($values);
     return $this->formBuilder->build();
 }