Test Failed
Pull Request — master (#132)
by Alessandro
03:15
created

PipelineFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreate() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Tests\Unit\Runner;
6
7
use Paraunit\Runner\Pipeline;
8
use Paraunit\Runner\PipelineFactory;
9
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
10
use Tests\BaseUnitTestCase;
11
12
/**
13
 * Class PipelineFactoryTest
14
 * @package Tests\Unit\Runner
15
 */
16
class PipelineFactoryTest extends BaseUnitTestCase
17
{
18
    public function testCreate()
19
    {
20
        $dispatcher = $this->prophesize(EventDispatcherInterface::class)->reveal();
21
        $factory = new PipelineFactory($dispatcher);
22
23
        $pipeline = $factory->create(5);
24
25
        $this->assertInstanceOf(Pipeline::class, $pipeline);
26
        $this->assertEquals(5, $pipeline->getNumber());
27
    }
28
}
29