Completed
Push — master ( 008bc0...0640ce )
by
unknown
46:22 queued 05:29
created

JobProcessingEventTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testEvent() 0 11 1
1
<?php
2
3
namespace SfCod\QueueBundle\Tests\Event;
4
5
use PHPUnit\Framework\TestCase;
6
use SfCod\QueueBundle\Event\JobProcessingEvent;
7
use SfCod\QueueBundle\Job\JobContractInterface;
8
use Symfony\Component\EventDispatcher\Event;
9
10
/**
11
 * Class JobProcessingEventTest
12
 * @author Virchenko Maksim <[email protected]>
13
 * @package SfCod\QueueBundle\Tests\Event
14
 */
15
class JobProcessingEventTest extends TestCase
16
{
17
    /**
18
     * Test event
19
     */
20
    public function testEvent()
21
    {
22
        $connectionName = uniqid('connection_');
23
        $job = $this->createMock(JobContractInterface::class);
24
25
        $event = new JobProcessingEvent($connectionName, $job);
26
27
        $this->assertInstanceOf(Event::class, $event);
28
        $this->assertEquals($connectionName, $event->getConnectionName());
29
        $this->assertEquals($job, $event->getJob());
30
    }
31
}