ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
GlobalSettingsTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
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 }
Global Settings of the Learning Sequence.
testIntervalAttribute(LSGlobalSettings $settings)
withPollingIntervalSeconds(float $seconds)