ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilDerivedTaskFactoryTest.php
Go to the documentation of this file.
1<?php
2
19require_once __DIR__ . '/bootstrap.php';
20
25{
26 public function testConstructor()
27 {
30 $factory = $service->derived()->factory();
31
32 $this->assertTrue($factory instanceof ilDerivedTaskFactory);
33 }
34
35 public function testTask(): void
36 {
39 $factory = $service->derived()->factory();
40
41 $task = $factory->task("title", 123, 1234, 1000);
42
43 $this->assertTrue($task instanceof ilDerivedTask);
44 $this->assertEquals('title', $task->getTitle());
45 $this->assertEquals(123, $task->getRefId());
46 $this->assertEquals(1234, $task->getDeadline());
47 $this->assertEquals(1000, $task->getStartingTime());
48 $this->assertEquals(0, $task->getWspId());
49 }
50
51 public function testCollector(): void
52 {
55 $factory = $service->derived()->factory();
56
57 $task = $factory->collector();
58
59 $this->assertTrue($task instanceof ilDerivedTaskCollector);
60 }
61
62 public function testAllProviders(): void
63 {
66 $factory = $service->derived()->factory();
67
68 $providers = $factory->getAllProviders();
69 $this->assertTrue($providers[0] instanceof ilDerivedTaskProvider);
70 }
71}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Base test class for tasks tests.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$service
Definition: ltiresult.php:36