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

Test clipboard repository. More...

+ Inheritance diagram for WorkspaceSessionRepositoryTest:
+ Collaboration diagram for WorkspaceSessionRepositoryTest:

Public Member Functions

 testClipboardCmd ()
 Test clipboard cmd. More...
 
 testSourceIds ()
 Test source ids. More...
 
 testShared ()
 Test source ids. More...
 
 testClear ()
 
 testNotEmpty ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
 getSessionRepo ()
 

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 WorkspaceSessionRepositoryTest.php.

Member Function Documentation

◆ getSessionRepo()

WorkspaceSessionRepositoryTest::getSessionRepo ( )
protected

Definition at line 37 of file WorkspaceSessionRepositoryTest.php.

38 {
39 $repo = new \ILIAS\PersonalWorkspace\WorkspaceSessionRepository();
40 $repo->clearClipboard();
41 return $repo;
42 }

Referenced by testClear(), testClipboardCmd(), testNotEmpty(), testShared(), and testSourceIds().

+ Here is the caller graph for this function:

◆ setUp()

WorkspaceSessionRepositoryTest::setUp ( )
protected

Definition at line 28 of file WorkspaceSessionRepositoryTest.php.

28 : void
29 {
30 parent::setUp();
31 }

◆ tearDown()

WorkspaceSessionRepositoryTest::tearDown ( )
protected

Definition at line 33 of file WorkspaceSessionRepositoryTest.php.

33 : void
34 {
35 }

◆ testClear()

WorkspaceSessionRepositoryTest::testClear ( )

Definition at line 86 of file WorkspaceSessionRepositoryTest.php.

86 : void
87 {
88 $repo = $this->getSessionRepo();
89 $repo->clearClipboard();
90
91 $this->assertEquals(
92 true,
93 $repo->isClipboardEmpty()
94 );
95 }

References getSessionRepo().

+ Here is the call graph for this function:

◆ testClipboardCmd()

WorkspaceSessionRepositoryTest::testClipboardCmd ( )

Test clipboard cmd.

Definition at line 47 of file WorkspaceSessionRepositoryTest.php.

47 : void
48 {
49 $repo = $this->getSessionRepo();
50 $repo->setClipboardCmd("cut");
51
52 $this->assertEquals(
53 "cut",
54 $repo->getClipboardCmd()
55 );
56 }

References getSessionRepo().

+ Here is the call graph for this function:

◆ testNotEmpty()

WorkspaceSessionRepositoryTest::testNotEmpty ( )

Definition at line 97 of file WorkspaceSessionRepositoryTest.php.

97 : void
98 {
99 $repo = $this->getSessionRepo();
100 $repo->clearClipboard();
101 $repo->setClipboardSourceIds([4,6,7]);
102 $repo->setClipboardCmd("cut");
103
104 $this->assertEquals(
105 false,
106 $repo->isClipboardEmpty()
107 );
108 }

References getSessionRepo().

+ Here is the call graph for this function:

◆ testShared()

WorkspaceSessionRepositoryTest::testShared ( )

Test source ids.

Definition at line 75 of file WorkspaceSessionRepositoryTest.php.

75 : void
76 {
77 $repo = $this->getSessionRepo();
78 $repo->setClipboardShared(true);
79
80 $this->assertEquals(
81 true,
82 $repo->getClipboardShared()
83 );
84 }

References getSessionRepo().

+ Here is the call graph for this function:

◆ testSourceIds()

WorkspaceSessionRepositoryTest::testSourceIds ( )

Test source ids.

Definition at line 61 of file WorkspaceSessionRepositoryTest.php.

61 : void
62 {
63 $repo = $this->getSessionRepo();
64 $repo->setClipboardSourceIds([4,6,7]);
65
66 $this->assertEquals(
67 [4,6,7],
68 $repo->getClipboardSourceIds()
69 );
70 }

References getSessionRepo().

+ Here is the call graph for this function:

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