|
@@ 53-65 (lines=13) @@
|
| 50 |
|
Debug::dump($this->job->getMessages()); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
public function testIsSend() |
| 54 |
|
{ |
| 55 |
|
$submission = $this->objFromFixture(PartialFormSubmission::class, 'submission1'); |
| 56 |
|
$config = SiteConfig::current_site_config(); |
| 57 |
|
$config->SendDailyEmail = true; |
| 58 |
|
$config->SendMailTo = '[email protected]'; |
| 59 |
|
$config->write(); |
| 60 |
|
$this->job->process(); |
| 61 |
|
|
| 62 |
|
$processedSubmission = $submission->get()->byID($submission->ID); |
| 63 |
|
|
| 64 |
|
$this->assertTrue((bool)$processedSubmission->IsSend); |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
public function testIsDeleted() |
| 68 |
|
{ |
|
@@ 67-81 (lines=15) @@
|
| 64 |
|
$this->assertTrue((bool)$processedSubmission->IsSend); |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
public function testIsDeleted() |
| 68 |
|
{ |
| 69 |
|
$submission = $this->objFromFixture(PartialFormSubmission::class, 'submission1'); |
| 70 |
|
$config = SiteConfig::current_site_config(); |
| 71 |
|
$config->SendDailyEmail = true; |
| 72 |
|
$config->CleanupAfterSend = true; |
| 73 |
|
$config->SendMailTo = '[email protected]'; |
| 74 |
|
$config->write(); |
| 75 |
|
$this->job->process(); |
| 76 |
|
$this->job->afterComplete(); |
| 77 |
|
|
| 78 |
|
$processedSubmission = $submission->get()->byID($submission->ID); |
| 79 |
|
|
| 80 |
|
$this->assertNull($processedSubmission); |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
public function testNewJobCreated() |
| 84 |
|
{ |