Conditions | 3 |
Paths | 3 |
Total Lines | 24 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
23 | */ |
||
24 | class BootstrapTest extends KernelTestCase |
||
25 | { |
||
26 | public function testBootstrap() |
||
27 | { |
||
28 | $this->bootKernel(); |
||
29 | |||
30 | $scheduler = self::$kernel->getContainer()->get('task.scheduler'); |
||
31 | $taskRepository = self::$kernel->getContainer()->get('task.storage.task'); |
||
32 | $taskExecutionRepository = self::$kernel->getContainer()->get('task.storage.task_execution'); |
||
33 | |||
34 | $this->assertInstanceOf(TaskSchedulerInterface::class, $scheduler); |
||
35 | |||
36 | switch (self::$kernel->getContainer()->getParameter('kernel.storage')) { |
||
37 | case 'array': |
||
38 | $this->assertInstanceOf(ArrayTaskRepository::class, $taskRepository); |
||
39 | $this->assertInstanceOf(ArrayTaskExecutionRepository::class, $taskExecutionRepository); |
||
40 | break; |
||
41 | case 'doctrine': |
||
42 | $this->assertInstanceOf(TaskRepository::class, $taskRepository); |
||
43 | $this->assertInstanceOf(TaskExecutionRepository::class, $taskExecutionRepository); |
||
44 | break; |
||
45 | default: |
||
46 | $this->fail('storage not supported'); |
||
47 | break; |
||
51 |