ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GlobalSettingsTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
23class GlobalSettingsTest extends TestCase
24{
26 {
27 $interval = 12.3;
28 $settings = new LSGlobalSettings($interval);
29 $this->assertEquals(
30 $interval,
31 $settings->getPollingIntervalSeconds()
32 );
33 return $settings;
34 }
35
36 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
37 public function testIntervalAttribute(LSGlobalSettings $settings): void
38 {
39 $interval = 2.0;
40 $settings = $settings->withPollingIntervalSeconds($interval);
41 $this->assertEquals(
42 $interval,
43 $settings->getPollingIntervalSeconds()
44 );
45 $this->assertEquals(
46 $interval * 1000,
48 );
49 }
50}
testIntervalAttribute(LSGlobalSettings $settings)
Global Settings of the Learning Sequence.
withPollingIntervalSeconds(float $seconds)