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
3use PHPUnit\Framework\TestCase;
4
5class LSGlobalSettingsTest extends TestCase
6{
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}
An exception for terminatinating execution or to throw for unit testing.
testIntervalAttribute(LSGlobalSettings $settings)
@depends testConstruction
Global Settings of the Learning Sequence.
withPollingIntervalSeconds(float $seconds)