Passed
Pull Request — master (#35)
by
unknown
03:37
created

TaskFinderTest::testAllAppAndPluginTasks()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Queue\Test\TestCase\Shell;
3
4
use Cake\TestSuite\TestCase;
5
use Queue\Queue\TaskFinder;
6
7
class TaskFinderTest extends TestCase
8
{
9
10
    /**
11
     *
12
     * @var \Queue\Shell\QueueShell|\PHPUnit_Framework_MockObject_MockObject
13
     */
14
    public $QueueShell;
15
16
    /**
17
     *
18
     * @var \Queue\Queue\TaskFinder
19
     */
20
    protected $taskFinder;
21
22
    /**
23
     * Fixtures to load
24
     *
25
     * @var array
26
     */
27
    public $fixtures = [
28
        'plugin.Queue.QueuedTasks',
29
    ];
30
31
    /**
32
     * Setup Defaults
33
     *
34
     * @return void
35
     */
36
    public function setUp()
37
    {
38
        parent::setUp();
39
    }
40
41
    /**
42
     *
43
     * @return void
44
     */
45
    public function testAllAppAndPluginTasks()
46
    {
47
        $this->taskFinder = new TaskFinder();
48
49
        $result = $this->taskFinder->allAppAndPluginTasks();
50
        $this->assertCount(1, $result);
51
        $this->assertArraySubset([
52
            'Queue.QueueExample'
53
        ], $result);
54
        $this->assertTrue(!in_array('Foo.QueueFoo', $result));
55
    }
56
}
57