@@ 13-22 (lines=10) @@ | ||
10 | ||
11 | class TaskBuilderTest extends \PHPUnit_Framework_TestCase |
|
12 | { |
|
13 | public function testSetSystemKey() |
|
14 | { |
|
15 | $task = $this->prophesize(Task::class); |
|
16 | $scheduler = $this->prophesize(TaskSchedulerInterface::class); |
|
17 | ||
18 | $taskBuilder = new TaskBuilder($task->reveal(), $scheduler->reveal()); |
|
19 | $taskBuilder->setSystemKey('test'); |
|
20 | ||
21 | $task->setSystemKey('test')->shouldBeCalled(); |
|
22 | } |
|
23 | ||
24 | public function testSetSystemKeyNotSupported() |
|
25 | { |
|
@@ 24-33 (lines=10) @@ | ||
21 | $task->setSystemKey('test')->shouldBeCalled(); |
|
22 | } |
|
23 | ||
24 | public function testSetSystemKeyNotSupported() |
|
25 | { |
|
26 | $this->setExpectedException(NotSupportedMethodException::class); |
|
27 | ||
28 | $task = $this->prophesize(TaskInterface::class); |
|
29 | $scheduler = $this->prophesize(TaskSchedulerInterface::class); |
|
30 | ||
31 | $taskBuilder = new TaskBuilder($task->reveal(), $scheduler->reveal()); |
|
32 | $taskBuilder->setSystemKey('test'); |
|
33 | } |
|
34 | } |
|
35 |