AbstractTaskTest::testConstructor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.3142
c 0
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
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