ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDerivedTaskFactoryTest.php
Go to the documentation of this file.
1<?php
18require_once __DIR__ . '/bootstrap.php';
19
24{
25 public function testConstructor()
26 {
29 $factory = $service->derived()->factory();
30
31 $this->assertTrue($factory instanceof ilDerivedTaskFactory);
32 }
33
34 public function testTask(): void
35 {
38 $factory = $service->derived()->factory();
39
40 $task = $factory->task("title", 123, 1234, 1000);
41
42 $this->assertTrue($task instanceof ilDerivedTask);
43 $this->assertEquals('title', $task->getTitle());
44 $this->assertEquals(123, $task->getRefId());
45 $this->assertEquals(1234, $task->getDeadline());
46 $this->assertEquals(1000, $task->getStartingTime());
47 $this->assertEquals(0, $task->getWspId());
48 }
49
50 public function testCollector(): void
51 {
54 $factory = $service->derived()->factory();
55
56 $task = $factory->collector();
57
58 $this->assertTrue($task instanceof ilDerivedTaskCollector);
59 }
60
61 public function testAllProviders(): void
62 {
65 $factory = $service->derived()->factory();
66
67 $providers = $factory->getAllProviders();
68 $this->assertTrue($providers[0] instanceof ilDerivedTaskProvider);
69 }
70}
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