ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilIndividualAssessmentExporterTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
24{
25 public function test_objectCreation(): void
26 {
28 $this->assertInstanceOf(ilIndividualAssessmentExporter::class, $obj);
29 }
30
32 {
34 $result = $obj->getXmlExportTailDependencies("no_entity", "", [12,13]);
35
36 $this->assertIsArray($result);
37 $this->assertEmpty($result);
38 }
39
41 {
42 $expected[] = [
43 "component" => "components/ILIAS/ILIASObject",
44 "entity" => "common",
45 "ids" => [12,13]
46 ];
47
49 $result = $obj->getXmlExportTailDependencies("iass", "", [12,13]);
50
51 $this->assertIsArray($result);
52 $this->assertEquals($expected, $result);
53 }
54
55 public function test_getValidSchemaVersions(): void
56 {
57 $expected = [
58 "5.2.0" => [
59 "namespace" => "http://www.ilias.de/Services/User/iass/5_2",
60 "xsd_file" => "ilias_iass_5_2.xsd",
61 "uses_dataset" => true,
62 "min" => "5.2.0",
63 "max" => "5.2.99"
64 ],
65 "5.3.0" => [
66 "namespace" => "http://www.ilias.de/Services/User/iass/5_3",
67 "xsd_file" => "ilias_iass_5_3.xsd",
68 "uses_dataset" => true,
69 "min" => "5.3.0",
70 "max" => "8"
71 ],
72 "9.0" => [
73 "namespace" => "http://www.ilias.de/xml/Modules/IndividualAssessment/iass",
74 "xsd_file" => "ilias_iass_9_0.xsd",
75 "uses_dataset" => true,
76 "min" => "9.0",
77 "max" => ""
78 ]
79 ];
80
82 $result = $obj->getValidSchemaVersions("");
83
84 $this->assertIsArray($result);
85 $this->assertEquals($expected, $result);
86 }
87}