Passed
Push — master ( 02bac5...a21440 )
by Mr
06:54
created

JobDefinitionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 15
ccs 10
cts 10
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetStrategy() 0 5 1
A testGetSettings() 0 6 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/async-job project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Daikon\Tests\AsyncJob\Job;
10
11
use Daikon\AsyncJob\Job\JobDefinition;
12
use Daikon\AsyncJob\Strategy\JobStrategyInterface;
13
use PHPUnit\Framework\TestCase;
14
15
final class JobDefinitionTest extends TestCase
16
{
17 1
    public function testGetStrategy(): void
18
    {
19 1
        $mockStrategy = $this->createMock(JobStrategyInterface::class);
20 1
        $jobDefinition = new JobDefinition($mockStrategy);
21 1
        $this->assertSame($mockStrategy, $jobDefinition->getStrategy());
22 1
    }
23
24 1
    public function testGetSettings(): void
25
    {
26 1
        $mockStrategy = $this->createMock(JobStrategyInterface::class);
27 1
        $settings = ['test' => 'value'];
28 1
        $jobDefinition = new JobDefinition($mockStrategy, $settings);
29 1
        $this->assertSame($settings, $jobDefinition->getSettings());
30 1
    }
31
}
32