ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilQTIParserTest Class Reference
+ Inheritance diagram for ilQTIParserTest:
+ Collaboration diagram for ilQTIParserTest:

Public Member Functions

 testConstruct ()
 
 testSetGetQuestionSetType ()
 
 testSetTestObject ()
 

Protected Member Functions

 setup ()
 
 tearDown ()
 

Detailed Description

Definition at line 25 of file ilQTIParserTest.php.

Member Function Documentation

◆ setup()

ilQTIParserTest::setup ( )
protected

Definition at line 50 of file ilQTIParserTest.php.

References $GLOBALS.

50  : void
51  {
52  $GLOBALS['DIC'] = $this->getMockBuilder(Container::class)->disableOriginalConstructor()->getMock();
53  $GLOBALS['DIC']->expects(self::any())->method('isDependencyAvailable')->with('language')->willReturn(false);
54  }
$GLOBALS["DIC"]
Definition: wac.php:31

◆ tearDown()

ilQTIParserTest::tearDown ( )
protected

Definition at line 56 of file ilQTIParserTest.php.

References $GLOBALS.

56  : void
57  {
58  unset($GLOBALS['DIC']);
59  }
$GLOBALS["DIC"]
Definition: wac.php:31

◆ testConstruct()

ilQTIParserTest::testConstruct ( )

Definition at line 27 of file ilQTIParserTest.php.

27  : void
28  {
29  $this->assertInstanceOf(ilQTIParser::class, new ilQTIParser('dummy xml file'));
30  }

◆ testSetGetQuestionSetType()

ilQTIParserTest::testSetGetQuestionSetType ( )

Definition at line 32 of file ilQTIParserTest.php.

32  : void
33  {
34  $instance = new ilQTIParser('dummy xml file');
35  $instance->setQuestionSetType('Some input.');
36  $this->assertEquals('Some input.', $instance->getQuestionSetType());
37  }

◆ testSetTestObject()

ilQTIParserTest::testSetTestObject ( )

Definition at line 39 of file ilQTIParserTest.php.

References $id.

39  : void
40  {
41  $id = 8098;
42  $test = $this->getMockBuilder(ilObjTest::class)->disableOriginalConstructor()->getMock();
43  $test->expects(self::once())->method('getId')->willReturn($id);
44  $instance = new ilQTIParser('dummy xml file');
45  $instance->setTestObject($test);
46  $this->assertEquals($test, $instance->tst_object);
47  $this->assertEquals($id, $instance->tst_id);
48  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

The documentation for this class was generated from the following file: