3declare(strict_types=1);
 
   30    protected function setUp(): void
 
   34        $lng_mock = $this->createMock(ilLanguage::class);
 
   35        $lng_mock->expects($this->any())
 
   37                 ->willReturnCallback(
function () {
 
   38                     return "testTranslation";
 
   40        $ctrl_mock = $this->createMock(ilCtrl::class);
 
   41        $ctrl_mock->expects($this->any())
 
   42                  ->method(
"getFormAction")
 
   43                  ->willReturnCallback(
function () {
 
   44                      return "testFormAction";
 
   50        $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
 
   51        $component_factory = $this->createMock(ilComponentFactory::class);
 
   52        $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
 
   56        $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array(
'getObject'))->getMock();
 
   57        $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->createMock(ilObjTest::class));
 
   61            $this->parentObj_mock,
 
   69        $this->assertInstanceOf(ilTestDynamicQuestionSetStatisticTableGUI::class, $this->tableGui);
 
   74        $this->assertNull($this->tableGui->getFilterSelection());
 
   77        $this->assertInstanceOf(
 
   78            ilTestDynamicQuestionSetFilterSelection::class,
 
   79            $this->tableGui->getFilterSelection()
 
   85        $this->tableGui->initTitle(
"tastas");
 
   86        $this->assertEquals(
"testTranslation", $this->tableGui->title);
 
   91        $this->assertIsArray($this->tableGui->getTaxIds());
 
   92        $expected = [10, 1250, 1233591, 12350];
 
   93        $this->tableGui->setTaxIds($expected);
 
   94        $this->assertEquals($expected, $this->tableGui->getTaxIds());
 
   99        $this->assertIsBool($this->tableGui->isAnswerStatusFilterEnabled());
 
  100        $this->tableGui->setAnswerStatusFilterEnabled(
false);
 
  101        $this->assertFalse($this->tableGui->isAnswerStatusFilterEnabled());
 
  102        $this->tableGui->setAnswerStatusFilterEnabled(
true);
 
  103        $this->assertTrue($this->tableGui->isAnswerStatusFilterEnabled());
 
  108        $this->assertIsBool($this->tableGui->isTaxonomyFilterEnabled());
 
  109        $this->tableGui->setTaxonomyFilterEnabled(
false);
 
  110        $this->assertFalse($this->tableGui->isTaxonomyFilterEnabled());
 
  111        $this->tableGui->setTaxonomyFilterEnabled(
true);
 
  112        $this->assertTrue($this->tableGui->isTaxonomyFilterEnabled());
 
setGlobalVariable(string $name, $value)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilTestDynamicQuestionSetStatisticTableGUI $tableGui
 
ilObjTestGUI $parentObj_mock
 
testTaxonomyFilterEnabled()
 
testAnswerStatusFilterEnabled()
 
test_instantiateObject_shouldReturnInstance()