Completed
Push — master ( 90a411...a748b4 )
by Simon
05:01
created

PartialSubmissionJobTest::testProcess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Firesphere\PartialUserforms\Tests;
4
5
use Firesphere\PartialUserforms\Jobs\PartialSubmissionJob;
6
use SilverStripe\Core\Config\Config;
7
use SilverStripe\Core\Injector\Injector;
8
use SilverStripe\Dev\SapphireTest;
9
use Symbiote\QueuedJobs\Services\QueuedJobService;
10
11
class PartialSubmissionJobTest extends SapphireTest
12
{
13
    /**
14
     * @var PartialSubmissionJob
15
     */
16
    protected $job;
17
18
    protected static $fixture_file = '../partialsubmissions.yml';
19
20
    public function testGetTitle()
21
    {
22
        $this->assertEquals('Export partial submissions to Email', $this->job->getTitle());
23
    }
24
25
    public function testProcess()
26
    {
27
        $this->assertTrue(method_exists($this->job, 'process'));
28
    }
29
30
    protected function setUp()
31
    {
32
        $this->usesDatabase = true;
33
        Config::modify()->set(QueuedJobService::class, 'use_shutdown_function', false);
34
        /** @var PartialSubmissionJob $job */
35
        $this->job = Injector::inst()->get(PartialSubmissionJob::class);
36
        return parent::setUp();
37
    }
38
}
39