JobQueueEventTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
dl 0
loc 9
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetJob() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace JCIT\jobqueue\tests\unit\events;
5
6
use Codeception\Test\Unit;
7
use JCIT\jobqueue\events\JobQueueEvent;
8
use JCIT\jobqueue\jobs\HelloJob;
9
10
class JobQueueEventTest extends Unit
11
{
12
    public function testGetJob(): void
13
    {
14
        $name = 'Test';
15
        $job = new HelloJob($name);
16
17
        $jobQueueEvent = new JobQueueEvent($job);
18
        $this->assertEquals($name, $jobQueueEvent->getJob()->getName());
0 ignored issues
show
Bug introduced by
The method getName() does not exist on JCIT\jobqueue\interfaces\JobInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to JCIT\jobqueue\interfaces\JobInterface. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        $this->assertEquals($name, $jobQueueEvent->getJob()->/** @scrutinizer ignore-call */ getName());
Loading history...
19
    }
20
}
21