ILIAS  release_8 Revision v8.24
ilTestExportFactoryTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
28
29 protected function setUp(): void
30 {
31 parent::setUp();
32
33 $this->testObj = new ilTestExportFactory($this->createMock(ilObjTest::class));
34 }
35
37 {
38 $this->assertInstanceOf(ilTestExportFactory::class, $this->testObj);
39 }
40
41 public function testGetExporter(): void
42 {
43 $this->addGlobal_ilUser();
44 $this->addGlobal_lng();
45 $this->addGlobal_ilias();
46 $this->addGlobal_ilDB();
47 $this->addGlobal_ilLog();
48 $this->addGlobal_ilErr();
49 $this->addGlobal_tree();
52
53 $objTest = new ilObjTest();
54
55 $objTest->setQuestionSetType(ilObjTest::QUESTION_SET_TYPE_FIXED);
56 $testObj = new ilTestExportFactory($objTest);
57 $this->assertInstanceOf(ilTestExportFixedQuestionSet::class, $testObj->getExporter());
58
59 $objTest->setQuestionSetType(ilObjTest::QUESTION_SET_TYPE_RANDOM);
60 $testObj = new ilTestExportFactory($objTest);
61 $this->assertInstanceOf(ilTestExportRandomQuestionSet::class, $testObj->getExporter());
62 }
63}
const QUESTION_SET_TYPE_RANDOM
const QUESTION_SET_TYPE_FIXED
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...