ILIAS  release_8 Revision v8.24
ilQTIResponseTest Class Reference
+ Inheritance diagram for ilQTIResponseTest:
+ Collaboration diagram for ilQTIResponseTest:

Public Member Functions

 testConstruct ()
 
 testSetGetIdent ()
 
 testSetGetRtiming (string $input, ?string $expected)
 @dataProvider rtimings More...
 
 testSetGetNumtype (string $input, ?string $expected)
 @dataProvider numtypes More...
 
 rtimings ()
 
 numtypes ()
 

Detailed Description

Definition at line 24 of file ilQTIResponseTest.php.

Member Function Documentation

◆ numtypes()

ilQTIResponseTest::numtypes ( )

Definition at line 71 of file ilQTIResponseTest.php.

71 : array
72 {
73 class_exists(ilQTIResponse::class); // Force autoload to define the constants.
74 return [
81 ['Random input.', null],
82 ];
83 }

References ilQTIResponse\NUMTYPE_DECIMAL, ilQTIResponse\NUMTYPE_INTEGER, and ilQTIResponse\NUMTYPE_SCIENTIFIC.

◆ rtimings()

ilQTIResponseTest::rtimings ( )

Definition at line 58 of file ilQTIResponseTest.php.

58 : array
59 {
60 class_exists(ilQTIResponse::class); // Force autoload to define the constants.
61
62 return [
67 ['Random input.', null],
68 ];
69 }

References ilQTIResponse\RTIMING_NO, and ilQTIResponse\RTIMING_YES.

◆ testConstruct()

ilQTIResponseTest::testConstruct ( )

Definition at line 26 of file ilQTIResponseTest.php.

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

◆ testSetGetIdent()

ilQTIResponseTest::testSetGetIdent ( )

Definition at line 31 of file ilQTIResponseTest.php.

31 : void
32 {
33 $instance = new ilQTIResponse();
34 $instance->setIdent('Some input.');
35 $this->assertEquals('Some input.', $instance->getIdent());
36 }

◆ testSetGetNumtype()

ilQTIResponseTest::testSetGetNumtype ( string  $input,
?string  $expected 
)

@dataProvider numtypes

Definition at line 51 of file ilQTIResponseTest.php.

51 : void
52 {
53 $instance = new ilQTIResponse();
54 $instance->setNumtype($input);
55 $this->assertEquals($expected, $instance->getNumtype());
56 }

◆ testSetGetRtiming()

ilQTIResponseTest::testSetGetRtiming ( string  $input,
?string  $expected 
)

@dataProvider rtimings

Definition at line 41 of file ilQTIResponseTest.php.

41 : void
42 {
43 $instance = new ilQTIResponse();
44 $instance->setRtiming($input);
45 $this->assertEquals($expected, $instance->getRtiming());
46 }

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