ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilQTIMaterialTest Class Reference
+ Inheritance diagram for ilQTIMaterialTest:
+ Collaboration diagram for ilQTIMaterialTest:

Public Member Functions

 testConstruct ()
 
 testAddMattext ()
 
 testAddMatimage ()
 
 testAddMatapplet ()
 
 testSetGetFlow ()
 
 testSetGetLabel ()
 

Detailed Description

Definition at line 23 of file ilQTIMaterialTest.php.

Member Function Documentation

◆ testAddMatapplet()

ilQTIMaterialTest::testAddMatapplet ( )

Definition at line 46 of file ilQTIMaterialTest.php.

46  : void
47  {
48  $instance = new ilQTIMaterial();
49  $applet = $this->getMockBuilder(ilQTIMatapplet::class)->disableOriginalConstructor()->getMock();
50  $instance->addMatapplet($applet);
51  $this->assertEquals([['material' => $applet, 'type' => 'matapplet']], $instance->materials);
52  }

◆ testAddMatimage()

ilQTIMaterialTest::testAddMatimage ( )

Definition at line 38 of file ilQTIMaterialTest.php.

38  : void
39  {
40  $instance = new ilQTIMaterial();
41  $image = $this->getMockBuilder(ilQTIMatimage::class)->disableOriginalConstructor()->getMock();
42  $instance->addMatimage($image);
43  $this->assertEquals([['material' => $image, 'type' => 'matimage']], $instance->materials);
44  }

◆ testAddMattext()

ilQTIMaterialTest::testAddMattext ( )

Definition at line 30 of file ilQTIMaterialTest.php.

30  : void
31  {
32  $instance = new ilQTIMaterial();
33  $text = $this->getMockBuilder(ilQTIMattext::class)->disableOriginalConstructor()->getMock();
34  $instance->addMattext($text);
35  $this->assertEquals([['material' => $text, 'type' => 'mattext']], $instance->materials);
36  }

◆ testConstruct()

ilQTIMaterialTest::testConstruct ( )

Definition at line 25 of file ilQTIMaterialTest.php.

25  : void
26  {
27  $this->assertInstanceOf(ilQTIMaterial::class, new ilQTIMaterial());
28  }

◆ testSetGetFlow()

ilQTIMaterialTest::testSetGetFlow ( )

Definition at line 54 of file ilQTIMaterialTest.php.

54  : void
55  {
56  $instance = new ilQTIMaterial();
57 
58  $this->assertEquals(0, $instance->getFlow());
59 
60  $instance->setFlow(8);
61  $this->assertEquals(8, $instance->getFlow());
62  }

◆ testSetGetLabel()

ilQTIMaterialTest::testSetGetLabel ( )

Definition at line 64 of file ilQTIMaterialTest.php.

References null.

64  : void
65  {
66  $instance = new ilQTIMaterial();
67 
68  $this->assertEquals(null, $instance->getLabel());
69 
70  $instance->setLabel('Some input.');
71  $this->assertEquals('Some input.', $instance->getLabel());
72  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

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