コード例 #1
0
ファイル: TalkFormTest.php プロジェクト: GeeH/opencfp
 /**
  * Test that form object correctly detects if all the required fields
  * are in the user-submitted data
  *
  * @test
  * @dataProvider hasRequiredProvider
  * @param array   $rawData  serialized user-submitted data
  * @param boolean $response
  */
 public function correctlyDetectsRequiredFields($rawData, $response)
 {
     $data = unserialize($rawData);
     $form = new \OpenCFP\Http\Form\TalkForm($data, $this->purifier);
     $this->assertEquals($response, $form->hasRequiredFields(), '\\OpenCFP\\Form\\TalkForm::hasRequired() did not work correctly');
 }
コード例 #2
0
ファイル: TalkFormTest.php プロジェクト: cgrandval/opencfp
 /**
  * Test that form object correctly detects if all the required fields
  * are in the user-submitted data
  *
  * @test
  * @dataProvider hasNoDesiredOrSponsorProvider
  * @param array   $rawData  serialized user-submitted data
  * @param boolean $response
  */
 public function submitsTalkWhenNoDesiredOrSponrosIncluded($rawData, $response)
 {
     $data = unserialize($rawData);
     $form = new \OpenCFP\Http\Form\TalkForm($data, $this->purifier);
     $this->assertEquals($response, $form->hasRequiredFields(), '\\OpenCFP\\Form\\TalkForm::hasRequired() did not work correctly');
 }