ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
PWspStandardGUIRequestTest Class Reference

Test clipboard repository. More...

+ Inheritance diagram for PWspStandardGUIRequestTest:
+ Collaboration diagram for PWspStandardGUIRequestTest:

Public Member Functions

 testRefId ()
 Test ref id. More...
 
 testNoRefId ()
 Test no ref id. More...
 
 testShareId ()
 Test share id. More...
 
 testNode ()
 Test node. More...
 

Protected Member Functions

 tearDown ()
 
 getRequest (array $get, array $post)
 

Detailed Description

Test clipboard repository.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file PWspStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

PWspStandardGUIRequestTest::getRequest ( array  $get,
array  $post 
)
protected

Definition at line 34 of file PWspStandardGUIRequestTest.php.

35 {
36 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
37 $lng_mock = $this->createMock(ilLanguage::class);
38 $data = new \ILIAS\Data\Factory();
39 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
40 return new \ILIAS\PersonalWorkspace\StandardGUIRequest(
41 $http_mock,
43 $get,
44 $post
45 );
46 }
$post
Definition: ltitoken.php:46
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References $data, $post, and ILIAS\UI\examples\Layout\Page\Standard\$refinery.

Referenced by testNode(), testNoRefId(), testRefId(), and testShareId().

+ Here is the caller graph for this function:

◆ tearDown()

PWspStandardGUIRequestTest::tearDown ( )
protected

Definition at line 30 of file PWspStandardGUIRequestTest.php.

30 : void
31 {
32 }

◆ testNode()

PWspStandardGUIRequestTest::testNode ( )

Test node.

Definition at line 104 of file PWspStandardGUIRequestTest.php.

104 : void
105 {
106 $request = $this->getRequest(
107 [
108 "node" => 12
109 ],
110 []
111 );
112
113 $this->assertEquals(
114 12,
115 $request->getNode()
116 );
117 }
getRequest(array $get, array $post)

References getRequest().

+ Here is the call graph for this function:

◆ testNoRefId()

PWspStandardGUIRequestTest::testNoRefId ( )

Test no ref id.

Definition at line 69 of file PWspStandardGUIRequestTest.php.

69 : void
70 {
71 $request = $this->getRequest(
72 [
73 ],
74 []
75 );
76
77 $this->assertEquals(
78 0,
79 $request->getRefId()
80 );
81 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

PWspStandardGUIRequestTest::testRefId ( )

Test ref id.

Definition at line 51 of file PWspStandardGUIRequestTest.php.

51 : void
52 {
53 $request = $this->getRequest(
54 [
55 "ref_id" => "5"
56 ],
57 []
58 );
59
60 $this->assertEquals(
61 5,
62 $request->getRefId()
63 );
64 }

References getRequest().

+ Here is the call graph for this function:

◆ testShareId()

PWspStandardGUIRequestTest::testShareId ( )

Test share id.

Definition at line 86 of file PWspStandardGUIRequestTest.php.

86 : void
87 {
88 $request = $this->getRequest(
89 [
90 "shr_id" => 16
91 ],
92 []
93 );
94
95 $this->assertEquals(
96 16,
97 $request->getShareId()
98 );
99 }

References getRequest().

+ Here is the call graph for this function:

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