|
@@ 96-106 (lines=11) @@
|
| 93 |
|
); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
public function testFinished() { |
| 97 |
|
$form = $this->setupFormFrontend(); |
| 98 |
|
|
| 99 |
|
// set formProcessed and SecurityID to replicate the form being filled out |
| 100 |
|
$this->session()->inst_set('SecurityID', 1); |
| 101 |
|
$this->session()->inst_set('FormProcessed', 1); |
| 102 |
|
|
| 103 |
|
$response = $this->get($form->URLSegment.'/finished'); |
| 104 |
|
|
| 105 |
|
$this->assertContains($form->OnCompleteMessage ,$response->getBody()); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
public function testAppendingFinished() { |
| 109 |
|
$form = $this->setupFormFrontend(); |
|
@@ 108-118 (lines=11) @@
|
| 105 |
|
$this->assertContains($form->OnCompleteMessage ,$response->getBody()); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
public function testAppendingFinished() { |
| 109 |
|
$form = $this->setupFormFrontend(); |
| 110 |
|
|
| 111 |
|
// replicate finished being added to the end of the form URL without the form being filled out |
| 112 |
|
$this->session()->inst_set('SecurityID', 1); |
| 113 |
|
$this->session()->inst_set('FormProcessed', null); |
| 114 |
|
|
| 115 |
|
$response = $this->get($form->URLSegment.'/finished'); |
| 116 |
|
|
| 117 |
|
$this->assertNotContains($form->OnCompleteMessage ,$response->getBody()); |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
public function testForm() { |
| 121 |
|
$form = $this->objFromFixture('UserDefinedForm', 'basic-form-page'); |