|
@@ 91-101 (lines=11) @@
|
| 88 |
|
$this->assertNull($processedSubmission); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
public function testFilesRemoved() |
| 92 |
|
{ |
| 93 |
|
$config = SiteConfig::current_site_config(); |
| 94 |
|
$config->SendDailyEmail = true; |
| 95 |
|
$config->SendMailTo = '[email protected]'; |
| 96 |
|
$config->write(); |
| 97 |
|
$this->job->process(); |
| 98 |
|
$this->job->afterComplete(); |
| 99 |
|
|
| 100 |
|
$this->assertFileNotExists('/tmp/Export of TestForm - 2018-01-01 12:00:00.csv'); |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
public function testNewJobCreated() |
| 104 |
|
{ |
|
@@ 143-154 (lines=12) @@
|
| 140 |
|
$this->assertEquals($expected, $emails); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
public function testCommaSeparatedUsers() |
| 144 |
|
{ |
| 145 |
|
$config = SiteConfig::current_site_config(); |
| 146 |
|
$config->SendDailyEmail = true; |
| 147 |
|
$config->SendMailTo = '[email protected], [email protected] , [email protected]'; |
| 148 |
|
$config->write(); |
| 149 |
|
|
| 150 |
|
$this->job->process(); |
| 151 |
|
$this->assertEmailSent('[email protected]'); |
| 152 |
|
$this->assertEmailSent('[email protected]'); |
| 153 |
|
$this->assertEmailSent('[email protected]'); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
public function testFromAddressSet() |
| 157 |
|
{ |
|
@@ 156-166 (lines=11) @@
|
| 153 |
|
$this->assertEmailSent('[email protected]'); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
public function testFromAddressSet() |
| 157 |
|
{ |
| 158 |
|
$config = SiteConfig::current_site_config(); |
| 159 |
|
$config->SendDailyEmail = true; |
| 160 |
|
$config->SendMailTo = '[email protected]'; |
| 161 |
|
$config->SendMailFrom = '[email protected]'; |
| 162 |
|
$config->write(); |
| 163 |
|
|
| 164 |
|
$this->job->process(); |
| 165 |
|
$this->assertEmailSent('[email protected]', '[email protected]'); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function testFromAddressNotSet() |
| 169 |
|
{ |
|
@@ 168-177 (lines=10) @@
|
| 165 |
|
$this->assertEmailSent('[email protected]', '[email protected]'); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function testFromAddressNotSet() |
| 169 |
|
{ |
| 170 |
|
$config = SiteConfig::current_site_config(); |
| 171 |
|
$config->SendDailyEmail = true; |
| 172 |
|
$config->SendMailTo = '[email protected]'; |
| 173 |
|
$config->write(); |
| 174 |
|
|
| 175 |
|
$this->job->process(); |
| 176 |
|
$this->assertEmailSent('[email protected]', 'site@' . Director::host()); |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
protected function setUp() |
| 180 |
|
{ |