ILIAS  trunk Revision v11.0_alpha-2658-ge2404539063
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 26 of file EditorEditSessionRepositoryTest.php.

Member Function Documentation

◆ setUp()

EditorEditSessionRepositoryTest::setUp ( )
protected

Definition at line 31 of file EditorEditSessionRepositoryTest.php.

31  : void
32  {
33  parent::setUp();
34  $this->repo = new \ILIAS\COPage\Editor\EditSessionRepository();
35  $this->repo->clear();
36  }

◆ tearDown()

EditorEditSessionRepositoryTest::tearDown ( )
protected

Definition at line 38 of file EditorEditSessionRepositoryTest.php.

38  : void
39  {
40  }

◆ testClear()

EditorEditSessionRepositoryTest::testClear ( )

Test clear.

Definition at line 45 of file EditorEditSessionRepositoryTest.php.

References $repo.

45  : void
46  {
48  $repo->setPageError("page_error");
49  $repo->setSubCmd("sub_cmd");
50  $repo->setQuestionPool(4);
51  $repo->setTextLang(10, "en");
52  $repo->setMediaPool(5);
53  $repo->clear([10]);
54  $this->assertEquals(
55  "00",
56  $repo->getPageError() .
57  $repo->getSubCmd() .
58  $repo->getTextLang(4) .
59  $repo->getMediaPool() .
60  $repo->getQuestionPool()
61  );
62  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testMediaPool()

EditorEditSessionRepositoryTest::testMediaPool ( )

Test media pool.

Definition at line 106 of file EditorEditSessionRepositoryTest.php.

References $repo.

106  : void
107  {
108  $repo = $this->repo;
109  $repo->setMediaPool(12);
110  $this->assertEquals(
111  12,
112  $repo->getMediaPool()
113  );
114  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testPageError()

EditorEditSessionRepositoryTest::testPageError ( )

Test page error.

Definition at line 67 of file EditorEditSessionRepositoryTest.php.

References $repo.

67  : void
68  {
70  $repo->setPageError("page_error");
71  $this->assertEquals(
72  "page_error",
73  $repo->getPageError()
74  );
75  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testQuestionPool()

EditorEditSessionRepositoryTest::testQuestionPool ( )

Test question pool.

Definition at line 93 of file EditorEditSessionRepositoryTest.php.

References $repo.

93  : void
94  {
96  $repo->setQuestionPool(15);
97  $this->assertEquals(
98  15,
99  $repo->getQuestionPool()
100  );
101  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testSubCmd()

EditorEditSessionRepositoryTest::testSubCmd ( )

Test sub-command.

Definition at line 80 of file EditorEditSessionRepositoryTest.php.

References $repo.

80  : void
81  {
83  $repo->setSubCmd("sub");
84  $this->assertEquals(
85  "sub",
86  $repo->getSubCmd()
87  );
88  }
ILIAS COPage Editor EditSessionRepository $repo

◆ testTextLang()

EditorEditSessionRepositoryTest::testTextLang ( )

Test text lang.

Definition at line 119 of file EditorEditSessionRepositoryTest.php.

References $repo.

119  : void
120  {
121  $repo = $this->repo;
122  $repo->setTextLang(17, "fr");
123  $this->assertEquals(
124  "fr",
125  $repo->getTextLang(17)
126  );
127  }
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: