ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
EditorEditSessionRepositoryTest Class Reference

Test clipboard repository. More...

+ Inheritance diagram for EditorEditSessionRepositoryTest:
+ Collaboration diagram for EditorEditSessionRepositoryTest:

Public Member Functions

 testClear ()
 Test clear. More...
 
 testPageError ()
 Test page error. More...
 
 testSubCmd ()
 Test sub-command. More...
 
 testQuestionPool ()
 Test question pool. More...
 
 testMediaPool ()
 Test media pool. More...
 
 testTextLang ()
 Test text lang. More...
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

ILIAS COPage Editor EditSessionRepository $repo
 

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

Member Function Documentation

◆ setUp()

EditorEditSessionRepositoryTest::setUp ( )
protected

Definition at line 15 of file EditorEditSessionRepositoryTest.php.

15  : void
16  {
17  parent::setUp();
18  $this->repo = new \ILIAS\COPage\Editor\EditSessionRepository();
19  $this->repo->clear();
20  }

◆ tearDown()

EditorEditSessionRepositoryTest::tearDown ( )
protected

Definition at line 22 of file EditorEditSessionRepositoryTest.php.

22  : void
23  {
24  }

◆ testClear()

EditorEditSessionRepositoryTest::testClear ( )

Test clear.

Definition at line 29 of file EditorEditSessionRepositoryTest.php.

References $repo.

29  : void
30  {
32  $repo->setPageError("page_error");
33  $repo->setSubCmd("sub_cmd");
34  $repo->setQuestionPool(4);
35  $repo->setTextLang(10, "en");
36  $repo->setMediaPool(5);
37  $repo->clear([10]);
38  $this->assertEquals(
39  "00",
40  $repo->getPageError() .
41  $repo->getSubCmd() .
42  $repo->getTextLang(4) .
43  $repo->getMediaPool() .
44  $repo->getQuestionPool()
45  );
46  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testMediaPool()

EditorEditSessionRepositoryTest::testMediaPool ( )

Test media pool.

Definition at line 90 of file EditorEditSessionRepositoryTest.php.

References $repo.

90  : void
91  {
93  $repo->setMediaPool(12);
94  $this->assertEquals(
95  12,
96  $repo->getMediaPool()
97  );
98  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testPageError()

EditorEditSessionRepositoryTest::testPageError ( )

Test page error.

Definition at line 51 of file EditorEditSessionRepositoryTest.php.

References $repo.

51  : void
52  {
54  $repo->setPageError("page_error");
55  $this->assertEquals(
56  "page_error",
57  $repo->getPageError()
58  );
59  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testQuestionPool()

EditorEditSessionRepositoryTest::testQuestionPool ( )

Test question pool.

Definition at line 77 of file EditorEditSessionRepositoryTest.php.

References $repo.

77  : void
78  {
80  $repo->setQuestionPool(15);
81  $this->assertEquals(
82  15,
83  $repo->getQuestionPool()
84  );
85  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testSubCmd()

EditorEditSessionRepositoryTest::testSubCmd ( )

Test sub-command.

Definition at line 64 of file EditorEditSessionRepositoryTest.php.

References $repo.

64  : void
65  {
67  $repo->setSubCmd("sub");
68  $this->assertEquals(
69  "sub",
70  $repo->getSubCmd()
71  );
72  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testTextLang()

EditorEditSessionRepositoryTest::testTextLang ( )

Test text lang.

Definition at line 103 of file EditorEditSessionRepositoryTest.php.

References $repo.

103  : void
104  {
105  $repo = $this->repo;
106  $repo->setTextLang(17, "fr");
107  $this->assertEquals(
108  "fr",
109  $repo->getTextLang(17)
110  );
111  }
ILIAS COPage Editor EditSessionRepository $repo

Field Documentation

◆ $repo

ILIAS COPage Editor EditSessionRepository EditorEditSessionRepositoryTest::$repo
protected

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