ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilQTIResponseTest Class Reference
+ Inheritance diagram for ilQTIResponseTest:
+ Collaboration diagram for ilQTIResponseTest:

Public Member Functions

 testConstruct ()
 
 testSetGetIdent ()
 
 testSetGetRtiming (string $input, ?string $expected)
 
 testSetGetNumtype (string $input, ?string $expected)
 

Static Public Member Functions

static rtimings ()
 
static numtypes ()
 

Detailed Description

Definition at line 23 of file ilQTIResponseTest.php.

Member Function Documentation

◆ numtypes()

static ilQTIResponseTest::numtypes ( )
static

Definition at line 66 of file ilQTIResponseTest.php.

66 : array
67 {
68 class_exists(ilQTIResponse::class); // Force autoload to define the constants.
69 return [
76 ['Random input.', null],
77 ];
78 }

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

◆ rtimings()

static ilQTIResponseTest::rtimings ( )
static

Definition at line 53 of file ilQTIResponseTest.php.

53 : array
54 {
55 class_exists(ilQTIResponse::class); // Force autoload to define the constants.
56
57 return [
62 ['Random input.', null],
63 ];
64 }

References ilQTIResponse\RTIMING_NO, and ilQTIResponse\RTIMING_YES.

◆ testConstruct()

ilQTIResponseTest::testConstruct ( )

Definition at line 25 of file ilQTIResponseTest.php.

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

◆ testSetGetIdent()

ilQTIResponseTest::testSetGetIdent ( )

Definition at line 30 of file ilQTIResponseTest.php.

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

◆ testSetGetNumtype()

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

Definition at line 46 of file ilQTIResponseTest.php.

46 : void
47 {
48 $instance = new ilQTIResponse();
49 $instance->setNumtype($input);
50 $this->assertEquals($expected, $instance->getNumtype());
51 }

◆ testSetGetRtiming()

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

Definition at line 38 of file ilQTIResponseTest.php.

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

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