ILIAS  release_8 Revision v8.24
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 12 of file UIFilterServiceSessionGatewayTest.php.

12 : void
13 {
14 parent::setUp();
15 $this->gateway = new ilUIFilterServiceSessionGateway();
16 $this->gateway->reset("filter_id");
17 }
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 19 of file UIFilterServiceSessionGatewayTest.php.

19 : void
20 {
21 }

◆ testClear()

UIFilterServiceSessionGatewayTest::testClear ( )

Definition at line 23 of file UIFilterServiceSessionGatewayTest.php.

23 : void
24 {
26 $gateway->writeActivated("filter_id", true);
27 $gateway->writeExpanded("filter_id", true);
28 $gateway->writeRendered("filter_id", "input_id", true);
29 $gateway->writeValue("filter_id", "input_id", "a value");
30 $gateway->reset("filter_id");
31
32 $this->assertEquals(
33 false,
34 $gateway->isActivated("filter_id", false)
35 );
36 $this->assertEquals(
37 false,
38 $gateway->isExpanded("filter_id", false)
39 );
40 $this->assertEquals(
41 false,
42 $gateway->isRendered("filter_id", "input_id", false)
43 );
44 $this->assertEquals(
45 null,
46 $gateway->getValue("filter_id", "input_id")
47 );
48 }
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 50 of file UIFilterServiceSessionGatewayTest.php.

50 : void
51 {
53 $gateway->writeActivated("filter_id", true);
54 $this->assertEquals(
55 true,
56 $gateway->isActivated("filter_id", false)
57 );
58 }

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

+ Here is the call graph for this function:

◆ testFilterExpanded()

UIFilterServiceSessionGatewayTest::testFilterExpanded ( )

Definition at line 60 of file UIFilterServiceSessionGatewayTest.php.

60 : void
61 {
63 $gateway->writeExpanded("filter_id", true);
64 $this->assertEquals(
65 true,
66 $gateway->isExpanded("filter_id", false)
67 );
68 }

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

+ Here is the call graph for this function:

◆ testFilterInputRendered()

UIFilterServiceSessionGatewayTest::testFilterInputRendered ( )

Definition at line 70 of file UIFilterServiceSessionGatewayTest.php.

70 : void
71 {
73 $gateway->writeRendered("filter_id", "input_id", true);
74 $this->assertEquals(
75 true,
76 $gateway->isRendered("filter_id", "input_id", false)
77 );
78 }

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

+ Here is the call graph for this function:

◆ testFilterInputValue()

UIFilterServiceSessionGatewayTest::testFilterInputValue ( )

Definition at line 80 of file UIFilterServiceSessionGatewayTest.php.

80 : void
81 {
83 $gateway->writeValue("filter_id", "input_id", "a value");
84 $this->assertEquals(
85 "a value",
86 $gateway->getValue("filter_id", "input_id")
87 );
88 }

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: