ILIAS  release_8 Revision v8.24
ilTestRandomQuestionSetPoolDeriverTest.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 ilTestRandomQuestionSetPoolDeriver(
34 $this->createMock(ilDBInterface::class),
35 $this->createMock(ilComponentRepository::class),
36 $this->getMockBuilder(ilObjTest::class)->disableOriginalConstructor()->getMock()
37 );
38 }
39
41 {
42 $this->assertInstanceOf(ilTestRandomQuestionSetPoolDeriver::class, $this->testObj);
43 }
44
45 public function testTargetContainerRef(): void
46 {
47 $this->testObj->setTargetContainerRef(125);
48 $this->assertEquals(125, $this->testObj->getTargetContainerRef());
49 }
50
51 public function testOwnerId(): void
52 {
53 $this->testObj->setOwnerId(125);
54 $this->assertEquals(125, $this->testObj->getOwnerId());
55 }
56
57 public function testSourcePoolDefinitionList(): void
58 {
59 $mock = $this->createMock(ilTestRandomQuestionSetSourcePoolDefinitionList::class);
60 $this->testObj->setSourcePoolDefinitionList($mock);
61 $this->assertEquals($mock, $this->testObj->getSourcePoolDefinitionList());
62 }
63}
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...