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

Public Member Functions

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

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 70 of file ilQTIResponseTest.php.

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

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

◆ rtimings()

static ilQTIResponseTest::rtimings ( )
static

Definition at line 57 of file ilQTIResponseTest.php.

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

57  : array
58  {
59  class_exists(ilQTIResponse::class); // Force autoload to define the constants.
60 
61  return [
66  ['Random input.', null],
67  ];
68  }
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 
)

numtypes

Definition at line 50 of file ilQTIResponseTest.php.

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

◆ testSetGetRtiming()

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

rtimings

Definition at line 40 of file ilQTIResponseTest.php.

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

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