ILIAS  release_8 Revision v8.23
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 10 of file WorkspaceSessionRepositoryTest.php.

Member Function Documentation

◆ getSessionRepo()

WorkspaceSessionRepositoryTest::getSessionRepo ( )
protected

Definition at line 21 of file WorkspaceSessionRepositoryTest.php.

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

22  {
23  $repo = new \ILIAS\PersonalWorkspace\WorkspaceSessionRepository();
24  $repo->clearClipboard();
25  return $repo;
26  }
+ Here is the caller graph for this function:

◆ setUp()

WorkspaceSessionRepositoryTest::setUp ( )
protected

Definition at line 12 of file WorkspaceSessionRepositoryTest.php.

12  : void
13  {
14  parent::setUp();
15  }

◆ tearDown()

WorkspaceSessionRepositoryTest::tearDown ( )
protected

Definition at line 17 of file WorkspaceSessionRepositoryTest.php.

17  : void
18  {
19  }

◆ testClear()

WorkspaceSessionRepositoryTest::testClear ( )

Definition at line 70 of file WorkspaceSessionRepositoryTest.php.

References getSessionRepo().

70  : void
71  {
72  $repo = $this->getSessionRepo();
73  $repo->clearClipboard();
74 
75  $this->assertEquals(
76  true,
77  $repo->isClipboardEmpty()
78  );
79  }
+ Here is the call graph for this function:

◆ testClipboardCmd()

WorkspaceSessionRepositoryTest::testClipboardCmd ( )

Test clipboard cmd.

Definition at line 31 of file WorkspaceSessionRepositoryTest.php.

References getSessionRepo().

31  : void
32  {
33  $repo = $this->getSessionRepo();
34  $repo->setClipboardCmd("cut");
35 
36  $this->assertEquals(
37  "cut",
38  $repo->getClipboardCmd()
39  );
40  }
+ Here is the call graph for this function:

◆ testNotEmpty()

WorkspaceSessionRepositoryTest::testNotEmpty ( )

Definition at line 81 of file WorkspaceSessionRepositoryTest.php.

References getSessionRepo().

81  : void
82  {
83  $repo = $this->getSessionRepo();
84  $repo->clearClipboard();
85  $repo->setClipboardSourceIds([4,6,7]);
86  $repo->setClipboardCmd("cut");
87 
88  $this->assertEquals(
89  false,
90  $repo->isClipboardEmpty()
91  );
92  }
+ Here is the call graph for this function:

◆ testShared()

WorkspaceSessionRepositoryTest::testShared ( )

Test source ids.

Definition at line 59 of file WorkspaceSessionRepositoryTest.php.

References getSessionRepo().

59  : void
60  {
61  $repo = $this->getSessionRepo();
62  $repo->setClipboardShared(true);
63 
64  $this->assertEquals(
65  true,
66  $repo->getClipboardShared()
67  );
68  }
+ Here is the call graph for this function:

◆ testSourceIds()

WorkspaceSessionRepositoryTest::testSourceIds ( )

Test source ids.

Definition at line 45 of file WorkspaceSessionRepositoryTest.php.

References getSessionRepo().

45  : void
46  {
47  $repo = $this->getSessionRepo();
48  $repo->setClipboardSourceIds([4,6,7]);
49 
50  $this->assertEquals(
51  [4,6,7],
52  $repo->getClipboardSourceIds()
53  );
54  }
+ Here is the call graph for this function:

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