ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ContentModeManagerTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
12 class ContentModeManagerTest extends TestCase
13 {
14  protected \ILIAS\Container\Content\ViewManager $manager;
15 
16  protected function setUp(): void
17  {
18  /* parent::setUp();
19  $view_repo = new \ILIAS\Container\Content\ModeSessionRepository();
20  $this->manager = new \ILIAS\Container\Content\ModeManager($view_repo);*/
21  }
22 
23  protected function tearDown(): void
24  {
25  }
26 
30  public function testAdminView(): void
31  {
32  $this->markTestSkipped('SetUp for this case fails.');
33 
34  $manager = $this->manager;
35 
36  $manager->setAdminMode();
37 
38  $this->assertEquals(
39  true,
40  $manager->isAdminMode()
41  );
42  $this->assertEquals(
43  false,
44  $manager->isContentMode()
45  );
46  }
47 
51  public function testContentView(): void
52  {
53  $this->markTestSkipped('SetUp for this case fails.');
54 
55  $manager = $this->manager;
56 
57  $manager->setContentMode();
58 
59  $this->assertEquals(
60  false,
61  $manager->isAdminMode()
62  );
63  $this->assertEquals(
64  true,
65  $manager->isContentMode()
66  );
67  }
68 }
Test clipboard repository.
ILIAS Container Content ViewManager $manager
testContentView()
Test content view.
testAdminView()
Test admin view.