ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
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.

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

66  : array
67  {
68  class_exists(ilQTIResponse::class); // Force autoload to define the constants.
69  return [
70  ['integer', ilQTIResponse::NUMTYPE_INTEGER],
72  ['decimal', ilQTIResponse::NUMTYPE_DECIMAL],
74  ['scientific', ilQTIResponse::NUMTYPE_SCIENTIFIC],
76  ['Random input.', null],
77  ];
78  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ rtimings()

static ilQTIResponseTest::rtimings ( )
static

Definition at line 53 of file ilQTIResponseTest.php.

References null, ilQTIResponse\RTIMING_NO, and ilQTIResponse\RTIMING_YES.

53  : array
54  {
55  class_exists(ilQTIResponse::class); // Force autoload to define the constants.
56 
57  return [
62  ['Random input.', null],
63  ];
64  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ 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: