AbstractTaskTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
cbo 2
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 21 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\Block\Core\Task;
13
14
use Bldr\Test\Mock\Task\MockTask;
15
16
/**
17
 * @author Aaron Scherer <[email protected]>
18
 */
19
class AbstractTaskTest extends \PHPUnit_Framework_TestCase
20
{
21
    public function testConstructor()
22
    {
23
        $task = new MockTask();
24
        $task->configure();
25
        $task->addParameter('test', false);
26
        $task->addParameter('required-test', true);
27
        $task->setParameter('required-test', 'test');
28
        $task->validate();
29
30
        $this->assertInstanceOf(
31
            'Bldr\Block\Core\Task\AbstractTask',
32
            $task
33
        );
34
        $this->assertInstanceOf(
35
            'Bldr\Task\TaskInterface',
36
            $task
37
        );
38
39
        $this->assertEquals('mock', $task->getName());
40
        $this->assertEquals('mock description', $task->getDescription());
41
    }
42
}
43