| @@ 47-59 (lines=13) @@ | ||
| 44 | $this->assertFileExists('/tmp/Export of TestForm - 2018-01-01 12:00:00.csv'); |
|
| 45 | } |
|
| 46 | ||
| 47 | public function testProcessNoMail() |
|
| 48 | { |
|
| 49 | $this->assertTrue(method_exists($this->job, 'process')); |
|
| 50 | SiteConfigHelper::setupSiteConfig('', null, true); |
|
| 51 | Security::setCurrentUser(null); |
|
| 52 | $this->job->setup(); |
|
| 53 | $this->job->process(); |
|
| 54 | ||
| 55 | $messages = $this->job->getMessages(); |
|
| 56 | foreach ($messages as $message) { |
|
| 57 | $this->assertContains('Can not process without valid email', $message); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testProcessNotSetup() |
|
| 62 | { |
|
| @@ 61-72 (lines=12) @@ | ||
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testProcessNotSetup() |
|
| 62 | { |
|
| 63 | SiteConfigHelper::setupSiteConfig('', null, false); |
|
| 64 | Security::setCurrentUser(null); |
|
| 65 | $this->job->setup(); |
|
| 66 | $this->job->process(); |
|
| 67 | ||
| 68 | $messages = $this->job->getMessages(); |
|
| 69 | foreach ($messages as $message) { |
|
| 70 | $this->assertContains('Daily exports are not enabled', $message); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | public function testIsSend() |
|
| 75 | { |
|