ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\test\ConsumerToolbox\SettingTest Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\test\ConsumerToolbox\SettingTest:
+ Collaboration diagram for ILIAS\LegalDocuments\test\ConsumerToolbox\SettingTest:

Public Member Functions

 testConstruct ()
 
 testValue ()
 
 testUpdate ()
 

Detailed Description

Definition at line 27 of file SettingTest.php.

Member Function Documentation

◆ testConstruct()

ILIAS\LegalDocuments\test\ConsumerToolbox\SettingTest::testConstruct ( )

Definition at line 29 of file SettingTest.php.

29 : void
30 {
31 $this->assertInstanceOf(Setting::class, new Setting($this->fail(...), $this->fail(...)));
32 }

◆ testUpdate()

ILIAS\LegalDocuments\test\ConsumerToolbox\SettingTest::testUpdate ( )

Definition at line 41 of file SettingTest.php.

41 : void
42 {
43 $value = new stdClass();
44
45 $instance = new Setting($this->fail(...), function ($x) use (&$called, $value): void {
46 $called = true;
47 $this->assertSame($value, $x);
48 });
49
50 $instance->update($value);
51 $this->assertTrue($called);
52 }

References ILIAS\LegalDocuments\ConsumerToolbox\Setting\update().

+ Here is the call graph for this function:

◆ testValue()

ILIAS\LegalDocuments\test\ConsumerToolbox\SettingTest::testValue ( )

Definition at line 34 of file SettingTest.php.

34 : void
35 {
36 $value = new stdClass();
37 $instance = new Setting(fn() => $value, $this->fail(...));
38 $this->assertSame($value, $instance->value());
39 }

The documentation for this class was generated from the following file: