ILIAS  release_8 Revision v8.24
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 24 of file ilQTIMaterialTest.php.

Member Function Documentation

◆ testAddMatapplet()

ilQTIMaterialTest::testAddMatapplet ( )

Definition at line 47 of file ilQTIMaterialTest.php.

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

◆ testAddMatimage()

ilQTIMaterialTest::testAddMatimage ( )

Definition at line 39 of file ilQTIMaterialTest.php.

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

◆ testAddMattext()

ilQTIMaterialTest::testAddMattext ( )

Definition at line 31 of file ilQTIMaterialTest.php.

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

◆ testConstruct()

ilQTIMaterialTest::testConstruct ( )

Definition at line 26 of file ilQTIMaterialTest.php.

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

◆ testSetGetFlow()

ilQTIMaterialTest::testSetGetFlow ( )

Definition at line 55 of file ilQTIMaterialTest.php.

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

◆ testSetGetLabel()

ilQTIMaterialTest::testSetGetLabel ( )

Definition at line 65 of file ilQTIMaterialTest.php.

65 : void
66 {
67 $instance = new ilQTIMaterial();
68
69 $this->assertEquals(null, $instance->getLabel());
70
71 $instance->setLabel('Some input.');
72 $this->assertEquals('Some input.', $instance->getLabel());
73 }

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