ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestQuestionPoolSelectorExplorerTest.php
Go to the documentation of this file.
1<?php
2
19namespace Test\tests;
20
26
28{
30
31 protected function setUp(): void
32 {
33 parent::setUp();
34
35 $this->addGlobal_ilSetting();
36 $this->addGlobal_ilAccess();
37 $this->addGlobal_ilLog();
38
39 $this->testObj = new ilTestQuestionPoolSelectorExplorer(
40 $this->createMock(ilTestRandomQuestionSetConfigGUI::class),
41 '',
42 '',
43 $this->createMock(ilObjectDataCache::class)
44 );
45 }
46
47 public function testConstruct(): void
48 {
49 $this->assertInstanceOf(ilRepositorySelectorExplorerGUI::class, $this->testObj);
50 }
51
52 #[\PHPUnit\Framework\Attributes\DataProvider('getAndSetAvailableQuestionPoolsDataProvider')]
53 public function testGetAndSetAvailableQuestionPools(array $IO): void
54 {
55 $this->assertEquals([], $this->testObj->getAvailableQuestionPools());
56 $this->assertNull($this->testObj->setAvailableQuestionPools($IO));
57 $this->assertEquals($IO, $this->testObj->getAvailableQuestionPools());
58 }
59
60 public static function getAndSetAvailableQuestionPoolsDataProvider(): array
61 {
62 return [
63 [[]],
64 [[1]],
65 [[1, 2]],
66 [[1, 2, 3]]
67 ];
68 }
69}
class ilObjectDataCache
Explorer for selecting repository items.
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...