Completed
Pull Request — master (#30)
by Matthew
07:12
created

StaticJobManagerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 6
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUpBeforeClass() 0 8 1
A testGetStatus() 0 5 1
1
<?php
2
3
namespace Dtc\QueueBundle\Tests\Manager;
4
5
use Dtc\QueueBundle\Model\Job;
6
use Dtc\QueueBundle\Model\JobTiming;
7
use Dtc\QueueBundle\Manager\JobTimingManager;
8
use Dtc\QueueBundle\Model\Run;
9
use Dtc\QueueBundle\Manager\RunManager;
10
use Dtc\QueueBundle\Tests\FibonacciWorker;
11
use Dtc\QueueBundle\Tests\StaticJobManager;
12
13
class StaticJobManagerTest extends BaseJobManagerTest
14
{
15
    public static function setUpBeforeClass()
16
    {
17
        self::$jobTimingManager = new JobTimingManager(JobTiming::class, false);
18
        self::$runManager = new RunManager(Run::class);
19
        self::$jobManager = new StaticJobManager(self::$runManager, self::$jobTimingManager, Job::class);
20
        self::$worker = new FibonacciWorker();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Dtc\QueueBundle\Tests\FibonacciWorker() of type object<Dtc\QueueBundle\Tests\FibonacciWorker> is incompatible with the declared type object<Dtc\QueueBundle\Manager\Worker> of property $worker.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
21
        parent::setUpBeforeClass();
22
    }
23
24
    public function testGetStatus()
25
    {
26
        $status = self::$jobManager->getStatus();
27
        self::assertNull($status);
28
    }
29
}
30