ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
GlobalSettingsTest.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 
4 
5 class LSGlobalSettingsTest extends TestCase
6 {
7  public function testConstruction() : LSGlobalSettings
8  {
9  $interval = 12.3;
10  $settings = new LSGlobalSettings($interval);
11  $this->assertEquals(
12  $interval,
13  $settings->getPollingIntervalSeconds()
14  );
15 
16  return $settings;
17  }
18 
22  public function testIntervalAttribute(LSGlobalSettings $settings)
23  {
24  $interval = 2.0;
25  $settings = $settings->withPollingIntervalSeconds($interval);
26  $this->assertEquals(
27  $interval,
28  $settings->getPollingIntervalSeconds()
29  );
30  $this->assertEquals(
31  $interval * 1000,
33  );
34  }
35 }
Global Settings of the Learning Sequence.
testIntervalAttribute(LSGlobalSettings $settings)
testConstruction
withPollingIntervalSeconds(float $seconds)