30 protected function setUp(): void
32 $this->data_factory =
new Data\Factory();
52 $this->data_factory->version(
"6.5"),
58 $this->data_factory->version(
"1.0.0"),
60 $this->data_factory->version(
"1.0.0"),
61 $this->data_factory->version(
"6.0"),
62 $this->data_factory->version(
"6.99"),
64 "richard.klees@concepts-and-training.de",
73 $this->assertEquals($this->pluginslot, $this->plugin->getPluginSlot());
74 $this->assertEquals($this->component, $this->plugin->getComponent());
75 $this->assertEquals(
"plg1", $this->plugin->getId());
76 $this->assertEquals(
"Plugin1", $this->plugin->getName());
77 $this->assertEquals(
"Type1", $this->plugin->getType());
78 $this->assertTrue($this->plugin->isActivated());
79 $this->assertEquals($this->data_factory->version(
"1.0.0"), $this->plugin->getCurrentVersion());
80 $this->assertEquals(12, $this->plugin->getCurrentDBVersion());
81 $this->assertEquals($this->data_factory->version(
"1.0.0"), $this->plugin->getAvailableVersion());
82 $this->assertEquals($this->data_factory->version(
"6.0"), $this->plugin->getMinimumILIASVersion());
83 $this->assertEquals($this->data_factory->version(
"6.99"), $this->plugin->getMaximumILIASVersion());
84 $this->assertEquals(
"Richard Klees", $this->plugin->getResponsible());
85 $this->assertEquals(
"richard.klees@concepts-and-training.de", $this->plugin->getResponsibleMail());
86 $this->assertTrue($this->plugin->supportsLearningProgress());
87 $this->assertFalse($this->plugin->supportsExport());
88 $this->assertTrue($this->plugin->supportsCLISetup());
93 $this->assertTrue($this->plugin->isInstalled());
99 $this->data_factory->version(
"6.5"),
107 $this->data_factory->version(
"1.0.0"),
108 $this->data_factory->version(
"6.0"),
109 $this->data_factory->version(
"6.99"),
111 "richard.klees@concepts-and-training.de",
117 $this->assertFalse($this->plugin->isInstalled());
122 $this->assertFalse($this->plugin->isUpdateRequired());
128 $this->data_factory->version(
"6.5"),
136 $this->data_factory->version(
"1.0.0"),
137 $this->data_factory->version(
"6.0"),
138 $this->data_factory->version(
"6.99"),
140 "richard.klees@concepts-and-training.de",
146 $this->assertFalse($this->plugin->isUpdateRequired());
152 $this->data_factory->version(
"6.5"),
158 $this->data_factory->version(
"2.0.0"),
160 $this->data_factory->version(
"1.0.0"),
161 $this->data_factory->version(
"6.0"),
162 $this->data_factory->version(
"6.99"),
164 "richard.klees@concepts-and-training.de",
170 $this->assertTrue($this->plugin->isUpdateRequired());
175 $this->assertFalse($this->plugin->isVersionToOld());
178 $this->data_factory->version(
"6.5"),
184 $this->data_factory->version(
"1.0.0"),
186 $this->data_factory->version(
"2.0.0"),
187 $this->data_factory->version(
"6.0"),
188 $this->data_factory->version(
"6.99"),
190 "richard.klees@concepts-and-training.de",
195 $this->assertFalse($plugin->isVersionToOld());
198 $this->data_factory->version(
"6.5"),
204 $this->data_factory->version(
"1.2.2"),
206 $this->data_factory->version(
"1.0.0"),
207 $this->data_factory->version(
"6.0"),
208 $this->data_factory->version(
"6.99"),
210 "richard.klees@concepts-and-training.de",
215 $this->assertTrue($plugin->isVersionToOld());
230 $this->data_factory->version(
"1.2.2"),
232 $this->data_factory->version(
"1.0.0"),
233 $this->data_factory->version(
"6.0"),
234 $this->data_factory->version(
"6.99"),
236 "richard.klees@concepts-and-training.de",
246 $data_factory =
new Data\Factory();
248 [$data_factory->version(
"5.4"),
false],
249 [$data_factory->version(
"6.5"),
true],
250 [$data_factory->version(
"7.1"),
false]
258 $this->plugin->getPath()
266 $this->plugin->getClassName()
273 "ilPlugin1ConfigGUI",
274 $this->plugin->getConfigGUIClassName()
283 bool $supports_current_ilias,
285 bool $is_version_to_old,
286 bool $is_activation_possible
288 $plugin =
new class ($is_installed, $supports_current_ilias, $needs_update, $is_version_to_old) extends
ilPluginInfo {
289 protected bool $is_installed;
290 protected bool $supports_current_ilias;
291 protected bool $needs_update;
292 protected bool $is_version_to_old;
296 bool $supports_current_ilias,
298 bool $is_version_to_old
300 $this->is_installed = $is_installed;
301 $this->supports_current_ilias = $supports_current_ilias;
302 $this->needs_update = $needs_update;
303 $this->is_version_to_old = $is_version_to_old;
306 public function isInstalled():
bool 308 return $this->is_installed;
311 public function isUpdateRequired():
bool 313 return $this->needs_update;
316 public function isCompliantToILIAS():
bool 318 return $this->supports_current_ilias;
321 public function isVersionToOld():
bool 323 return $this->is_version_to_old;
334 [
false,
false,
false,
false,
false],
335 [
false,
false,
true,
false,
false],
336 [
false,
true,
false,
false,
false],
337 [
false,
true,
true,
false,
false],
338 [
true,
false,
false,
false,
false],
339 [
true,
false,
true,
false,
false],
340 [
true,
true,
false,
false,
true],
341 [
true,
true,
true,
true,
false],
342 [
false,
false,
false,
true,
false],
343 [
false,
false,
true,
true,
false],
344 [
false,
true,
false,
true,
false],
345 [
false,
true,
true,
true,
false],
346 [
true,
false,
false,
true,
false],
347 [
true,
false,
true,
true,
false],
348 [
true,
true,
false,
true,
false],
349 [
true,
true,
true,
true,
false]
358 bool $supports_current_ilias,
361 bool $is_version_to_old,
362 bool $is_activation_possible
364 $plugin =
new class ($is_installed, $supports_current_ilias, $needs_update, $is_activated, $is_version_to_old) extends
ilPluginInfo {
365 protected bool $is_installed;
366 protected bool $supports_current_ilias;
367 protected bool $needs_update;
368 protected bool $is_activated;
369 protected bool $is_version_to_old;
373 bool $supports_current_ilias,
376 bool $is_version_to_old
378 $this->is_installed = $is_installed;
379 $this->supports_current_ilias = $supports_current_ilias;
380 $this->needs_update = $needs_update;
381 $this->is_activated = $is_activated;
382 $this->is_version_to_old = $is_version_to_old;
385 public function isActivated():
bool 387 return $this->is_activated;
390 public function isInstalled():
bool 392 return $this->is_installed;
395 public function isUpdateRequired():
bool 397 return $this->needs_update;
400 public function isCompliantToILIAS():
bool 402 return $this->supports_current_ilias;
405 public function isVersionToOld():
bool 407 return $this->is_version_to_old;
411 $this->assertEquals($is_activation_possible, $plugin->
isActive());
418 [
false,
false,
false,
false,
false,
false],
419 [
false,
false,
false,
true,
false,
false],
420 [
false,
false, true ,
false,
false,
false],
421 [
false,
false, true ,
true,
false,
false],
422 [
false,
true,
false,
false,
false,
false],
423 [
false,
true,
false,
true,
false,
false],
424 [
false,
true, true ,
false,
false,
false],
425 [
false,
true, true ,
true,
false,
false],
426 [
true,
false,
false,
false,
false,
false],
427 [
true,
false,
false,
true,
false,
false],
428 [
true,
false, true ,
false,
false,
false],
429 [
true,
false, true ,
true,
false,
false],
430 [
true,
true,
false,
false,
false,
false],
431 [
true,
true,
false,
true,
false,
true],
432 [
true,
true, true ,
false,
false,
false],
433 [
true,
true, true ,
true,
false,
false],
435 [
false,
false,
false,
false,
true,
false],
436 [
false,
false,
false,
true,
true,
false],
437 [
false,
false, true ,
false,
true,
false],
438 [
false,
false, true ,
true,
true,
false],
439 [
false,
true,
false,
false,
true,
false],
440 [
false,
true,
false,
true,
true,
false],
441 [
false,
true, true ,
false,
true,
false],
442 [
false,
true, true ,
true,
true,
false],
443 [
true,
false,
false,
false,
true,
false],
444 [
true,
false,
false,
true,
true,
false],
445 [
true,
false, true ,
false,
true,
false],
446 [
true,
false, true ,
true,
true,
false],
447 [
true,
true,
false,
false,
true,
false],
448 [
true,
true,
false,
true,
true,
false],
449 [
true,
true, true ,
false,
true,
false],
450 [
true,
true, true ,
true,
true,
false],
460 bool $supports_current_ilias,
463 bool $is_version_to_old,
464 string $inactivity_reason
466 $plugin =
new class ($is_installed, $supports_current_ilias, $needs_update, $is_activated, $is_version_to_old) extends
ilPluginInfo {
467 protected bool $is_installed;
468 protected bool $supports_current_ilias;
469 protected bool $needs_update;
470 protected bool $is_activated;
471 protected bool $is_version_to_old;
475 bool $supports_current_ilias,
478 bool $is_version_to_old
480 $this->is_installed = $is_installed;
481 $this->supports_current_ilias = $supports_current_ilias;
482 $this->needs_update = $needs_update;
483 $this->is_activated = $is_activated;
484 $this->is_version_to_old = $is_version_to_old;
487 public function isActivated():
bool 489 return $this->is_activated;
492 public function isInstalled():
bool 494 return $this->is_installed;
497 public function isUpdateRequired():
bool 499 return $this->needs_update;
502 public function isCompliantToILIAS():
bool 504 return $this->supports_current_ilias;
509 return $this->current_version;
512 public function isVersionToOld():
bool 514 return $this->is_version_to_old;
523 $this->expectException(LogicException::class);
530 public function isActive():
bool 543 [
false,
false,
false,
false,
false,
"cmps_needs_matching_ilias_version"],
544 [
false,
false,
false,
true,
false,
"cmps_needs_matching_ilias_version"],
545 [
false,
false, true ,
false,
false,
"cmps_needs_matching_ilias_version"],
546 [
false,
false, true ,
true,
false,
"cmps_needs_matching_ilias_version"],
547 [
false,
true,
false,
false,
false,
"cmps_must_installed"],
548 [
false,
true,
false,
true,
false,
"cmps_must_installed"],
549 [
false,
true, true ,
false,
false,
"cmps_must_installed"],
550 [
false,
true, true ,
true,
false,
"cmps_must_installed"],
551 [
true,
false,
false,
false,
false,
"cmps_needs_matching_ilias_version"],
552 [
true,
false,
false,
true,
false,
"cmps_needs_matching_ilias_version"],
553 [
true,
false, true ,
false,
false,
"cmps_needs_matching_ilias_version"],
554 [
true,
false, true ,
true,
false,
"cmps_needs_matching_ilias_version"],
555 [
true,
true,
false,
false,
false,
"cmps_not_activated"],
556 [
true,
true, true ,
false,
false,
"cmps_needs_update"],
557 [
true,
true, true ,
true,
false,
"cmps_needs_update"],
558 [
false,
false,
false,
false,
true,
"cmps_needs_matching_ilias_version"],
559 [
false,
false,
false,
true,
true,
"cmps_needs_matching_ilias_version"],
560 [
false,
false, true ,
false,
true,
"cmps_needs_matching_ilias_version"],
561 [
false,
false, true ,
true,
true,
"cmps_needs_matching_ilias_version"],
562 [
false,
true,
false,
false,
true,
"cmps_must_installed"],
563 [
false,
true,
false,
true,
true,
"cmps_must_installed"],
564 [
false,
true, true ,
false,
true,
"cmps_must_installed"],
565 [
false,
true, true ,
true,
true,
"cmps_must_installed"],
566 [
true,
false,
false,
false,
true,
"cmps_needs_matching_ilias_version"],
567 [
true,
false,
false,
true,
true,
"cmps_needs_matching_ilias_version"],
568 [
true,
false, true ,
false,
true,
"cmps_needs_matching_ilias_version"],
569 [
true,
false, true ,
true,
true,
"cmps_needs_matching_ilias_version"],
570 [
true,
true,
false,
false,
true,
"cmps_needs_upgrade"],
571 [
true,
true, true ,
false,
true,
"cmps_needs_upgrade"],
572 [
true,
true, true ,
true,
true,
"cmps_needs_upgrade"],
static versionCompliance()
testIsCompliantToILIAS(Data\Version $version, bool $is_compliant)
versionCompliance
testGetReasonForInactivityThrowsOnActivePlugin()
testIsActivationPossible(bool $is_installed, bool $supports_current_ilias, bool $needs_update, bool $is_version_to_old, bool $is_activation_possible)
isActivationPossibleTruthTable
testIsActive(bool $is_installed, bool $supports_current_ilias, bool $needs_update, bool $is_activated, bool $is_version_to_old, bool $is_activation_possible)
isActiveTruthTable
ilComponentInfo $component
Simple value class for basic information about a pluginslot.
isActive()
Is this plugin active right now?
Data Factory $data_factory
testUpdateIsNotRequired()
testUpdateIsNotRequiredNotInstalled()
static inactivityReasonTable()
testGetConfigureClassName()
static isActivationPossibleTruthTable()
isActivationPossible()
Can this plugin be activated right now.
isCompliantToILIAS()
"ILIAS Version compliance" tells if the plugin can be operated with the given ILIAS version...
Simple value class for information about a plugin.
getReasonForInactivity()
Which is the reason for the inactivity?
ilPluginSlotInfo $pluginslot
__construct(Container $dic, ilPlugin $plugin)
static isActiveTruthTable()
A version number that consists of three numbers (major, minor, patch).
Simple value class for basic information about a component.
testGetReasonForInactivity(bool $is_installed, bool $supports_current_ilias, bool $needs_update, bool $is_activated, bool $is_version_to_old, string $inactivity_reason)
inactivityReasonTable
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...