AbstractTaskTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
cbo 5
dl 0
loc 30
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B testInitialize() 0 27 1
1
<?php
2
3
/**
4
 * This file is part of Bldr.io
5
 *
6
 * (c) Aaron Scherer <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE
10
 */
11
12
namespace Bldr\Test\Task;
13
14
use Bldr\Task\TaskInterface;
15
use Bldr\Test\Mock\Task\MockTask;
16
use Mockery\MockInterface;
17
18
/**
19
 * @author Aaron Scherer <[email protected]>
20
 */
21
class AbstractTaskTest extends \PHPUnit_Framework_TestCase
22
{
23
    public function testInitialize()
24
    {
25
        /** @var MockInterface[] $properties */
26
        $properties = [
27
            'dispatcher' => \Mockery::mock('Symfony\Component\EventDispatcher\EventDispatcher'),
28
            'output'     => \Mockery::mock('Bldr\Output\BldrOutput'),
29
            'task'       => \Mockery::mock('Bldr\Task\TaskInterface'),
30
        ];
31
32
        $properties['task']->shouldReceive('getProperties')
33
            ->withNoArgs()
34
            ->andReturn([]);
35
36
        $task = new MockTask();
37
        $task->configure();
38
        $task->validate();
39
40
        $this->assertInstanceOf(
41
            'Bldr\Task\TaskInterface',
42
            $task
43
        );
44
45
        $this->assertInstanceOf(
46
            'Bldr\Block\Core\Task\AbstractTask',
47
            $task
48
        );
49
    }
50
}
51