ILIAS  release_8 Revision v8.24
MediaCastStandardGUIRequestTest Class Reference
+ Inheritance diagram for MediaCastStandardGUIRequestTest:
+ Collaboration diagram for MediaCastStandardGUIRequestTest:

Public Member Functions

 testRefId ()
 
 testMimeTypes ()
 
 testItemIds ()
 
 testSeconds ()
 

Protected Member Functions

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

Detailed Description

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

Definition at line 8 of file MediaCastStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 16 of file MediaCastStandardGUIRequestTest.php.

17 {
18 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
19 $lng_mock = $this->createMock(ilLanguage::class);
20 $data = new \ILIAS\Data\Factory();
21 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
22 return new \ILIAS\MediaCast\StandardGUIRequest(
23 $http_mock,
25 $get,
26 $post
27 );
28 }
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
Class ChatMainBarProvider \MainMenu\Provider.

References $data, $post, and ILIAS\Repository\$refinery.

Referenced by testItemIds(), testMimeTypes(), testRefId(), and testSeconds().

+ Here is the caller graph for this function:

◆ tearDown()

MediaCastStandardGUIRequestTest::tearDown ( )
protected

Definition at line 12 of file MediaCastStandardGUIRequestTest.php.

12 : void
13 {
14 }

◆ testItemIds()

MediaCastStandardGUIRequestTest::testItemIds ( )

Definition at line 60 of file MediaCastStandardGUIRequestTest.php.

60 : void
61 {
62 $request = $this->getRequest(
63 [
64 ],
65 [
66 "item_id" => ["4", "7", "8"]
67 ]
68 );
69
70 $this->assertEquals(
71 [4,7,8],
72 $request->getItemIds()
73 );
74 }

References getRequest().

+ Here is the call graph for this function:

◆ testMimeTypes()

MediaCastStandardGUIRequestTest::testMimeTypes ( )

Definition at line 45 of file MediaCastStandardGUIRequestTest.php.

45 : void
46 {
47 $request = $this->getRequest(
48 [
49 "mimetypes" => "a,b"
50 ],
51 []
52 );
53
54 $this->assertEquals(
55 "a,b",
56 $request->getMimeTypes()
57 );
58 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

MediaCastStandardGUIRequestTest::testRefId ( )

Definition at line 30 of file MediaCastStandardGUIRequestTest.php.

30 : void
31 {
32 $request = $this->getRequest(
33 [
34 "ref_id" => "5"
35 ],
36 []
37 );
38
39 $this->assertEquals(
40 5,
41 $request->getRefId()
42 );
43 }

References getRequest().

+ Here is the call graph for this function:

◆ testSeconds()

MediaCastStandardGUIRequestTest::testSeconds ( )

Definition at line 76 of file MediaCastStandardGUIRequestTest.php.

76 : void
77 {
78 $request = $this->getRequest(
79 [
80 "sec" => "5"
81 ],
82 []
83 );
84
85 $this->assertEquals(
86 5,
87 $request->getSeconds()
88 );
89 }

References getRequest().

+ Here is the call graph for this function:

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