ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
writeValue(string $filter_id, string $input_id, $value)
Write session value for an input field.
isRendered(string $filter_id, string $input_id, bool $default)
writeRendered(string $filter_id, string $input_id, bool $value)
reset(string $filter_id)
Resets filter to its default state.
getValue(string $filter_id, string $input_id)
+ Here is the call graph for this function:

◆ testFilterActivated()

UIFilterServiceSessionGatewayTest::testFilterActivated ( )

Definition at line 66 of file UIFilterServiceSessionGatewayTest.php.

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

66  : void
67  {
69  $gateway->writeActivated("filter_id", true);
70  $this->assertEquals(
71  true,
72  $gateway->isActivated("filter_id", false)
73  );
74  }
+ Here is the call graph for this function:

◆ testFilterExpanded()

UIFilterServiceSessionGatewayTest::testFilterExpanded ( )

Definition at line 76 of file UIFilterServiceSessionGatewayTest.php.

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

76  : void
77  {
79  $gateway->writeExpanded("filter_id", true);
80  $this->assertEquals(
81  true,
82  $gateway->isExpanded("filter_id", false)
83  );
84  }
+ Here is the call graph for this function:

◆ testFilterInputRendered()

UIFilterServiceSessionGatewayTest::testFilterInputRendered ( )

Definition at line 86 of file UIFilterServiceSessionGatewayTest.php.

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

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  }
isRendered(string $filter_id, string $input_id, bool $default)
writeRendered(string $filter_id, string $input_id, bool $value)
+ Here is the call graph for this function:

◆ testFilterInputValue()

UIFilterServiceSessionGatewayTest::testFilterInputValue ( )

Definition at line 96 of file UIFilterServiceSessionGatewayTest.php.

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

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  }
writeValue(string $filter_id, string $input_id, $value)
Write session value for an input field.
getValue(string $filter_id, string $input_id)
+ 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: