ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
UIFilterServiceSessionGatewayTest Class Reference
+ Inheritance diagram for UIFilterServiceSessionGatewayTest:
+ Collaboration diagram for UIFilterServiceSessionGatewayTest:

Public Member Functions

 testClear ()
 
 testFilterActivated ()
 
 testFilterExpanded ()
 
 testFilterInputRendered ()
 
 testFilterInputValue ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

ilUIFilterServiceSessionGateway $gateway
 

Detailed Description

Member Function Documentation

◆ setUp()

UIFilterServiceSessionGatewayTest::setUp ( )
protected

Definition at line 28 of file UIFilterServiceSessionGatewayTest.php.

28 : void
29 {
30 parent::setUp();
31 $this->gateway = new ilUIFilterServiceSessionGateway();
32 $this->gateway->reset("filter_id");
33 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ tearDown()

UIFilterServiceSessionGatewayTest::tearDown ( )
protected

Definition at line 35 of file UIFilterServiceSessionGatewayTest.php.

35 : void
36 {
37 }

◆ testClear()

UIFilterServiceSessionGatewayTest::testClear ( )

Definition at line 39 of file UIFilterServiceSessionGatewayTest.php.

39 : void
40 {
42 $gateway->writeActivated("filter_id", true);
43 $gateway->writeExpanded("filter_id", true);
44 $gateway->writeRendered("filter_id", "input_id", true);
45 $gateway->writeValue("filter_id", "input_id", "a value");
46 $gateway->reset("filter_id");
47
48 $this->assertEquals(
49 false,
50 $gateway->isActivated("filter_id", false)
51 );
52 $this->assertEquals(
53 false,
54 $gateway->isExpanded("filter_id", false)
55 );
56 $this->assertEquals(
57 false,
58 $gateway->isRendered("filter_id", "input_id", false)
59 );
60 $this->assertEquals(
61 null,
62 $gateway->getValue("filter_id", "input_id")
63 );
64 }
isRendered(string $filter_id, string $input_id, bool $default)
reset(string $filter_id)
Resets filter to its default state.
writeValue(string $filter_id, string $input_id, $value)
Write session value for an input field.
writeRendered(string $filter_id, string $input_id, bool $value)
getValue(string $filter_id, string $input_id)

References $gateway, ilUIFilterServiceSessionGateway\getValue(), ilUIFilterServiceSessionGateway\isActivated(), ilUIFilterServiceSessionGateway\isExpanded(), ilUIFilterServiceSessionGateway\isRendered(), ilUIFilterServiceSessionGateway\reset(), ilUIFilterServiceSessionGateway\writeActivated(), ilUIFilterServiceSessionGateway\writeExpanded(), ilUIFilterServiceSessionGateway\writeRendered(), and ilUIFilterServiceSessionGateway\writeValue().

+ Here is the call graph for this function:

◆ testFilterActivated()

UIFilterServiceSessionGatewayTest::testFilterActivated ( )

Definition at line 66 of file UIFilterServiceSessionGatewayTest.php.

66 : void
67 {
69 $gateway->writeActivated("filter_id", true);
70 $this->assertEquals(
71 true,
72 $gateway->isActivated("filter_id", false)
73 );
74 }

References $gateway, ilUIFilterServiceSessionGateway\isActivated(), and ilUIFilterServiceSessionGateway\writeActivated().

+ Here is the call graph for this function:

◆ testFilterExpanded()

UIFilterServiceSessionGatewayTest::testFilterExpanded ( )

Definition at line 76 of file UIFilterServiceSessionGatewayTest.php.

76 : void
77 {
79 $gateway->writeExpanded("filter_id", true);
80 $this->assertEquals(
81 true,
82 $gateway->isExpanded("filter_id", false)
83 );
84 }

References $gateway, ilUIFilterServiceSessionGateway\isExpanded(), and ilUIFilterServiceSessionGateway\writeExpanded().

+ Here is the call graph for this function:

◆ testFilterInputRendered()

UIFilterServiceSessionGatewayTest::testFilterInputRendered ( )

Definition at line 86 of file UIFilterServiceSessionGatewayTest.php.

86 : void
87 {
89 $gateway->writeRendered("filter_id", "input_id", true);
90 $this->assertEquals(
91 true,
92 $gateway->isRendered("filter_id", "input_id", false)
93 );
94 }

References $gateway, ilUIFilterServiceSessionGateway\isRendered(), and ilUIFilterServiceSessionGateway\writeRendered().

+ Here is the call graph for this function:

◆ testFilterInputValue()

UIFilterServiceSessionGatewayTest::testFilterInputValue ( )

Definition at line 96 of file UIFilterServiceSessionGatewayTest.php.

96 : void
97 {
99 $gateway->writeValue("filter_id", "input_id", "a value");
100 $this->assertEquals(
101 "a value",
102 $gateway->getValue("filter_id", "input_id")
103 );
104 }

References $gateway, ilUIFilterServiceSessionGateway\getValue(), and ilUIFilterServiceSessionGateway\writeValue().

+ Here is the call graph for this function:

Field Documentation

◆ $gateway

ilUIFilterServiceSessionGateway UIFilterServiceSessionGatewayTest::$gateway
protected

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