ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables 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...
 
 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.

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

71  : array
72  {
73  class_exists(ilQTIResponse::class); // Force autoload to define the constants.
74  return [
75  ['integer', ilQTIResponse::NUMTYPE_INTEGER],
77  ['decimal', ilQTIResponse::NUMTYPE_DECIMAL],
79  ['scientific', ilQTIResponse::NUMTYPE_SCIENTIFIC],
81  ['Random input.', null],
82  ];
83  }

◆ rtimings()

ilQTIResponseTest::rtimings ( )

Definition at line 58 of file ilQTIResponseTest.php.

References ilQTIResponse\RTIMING_NO, and ilQTIResponse\RTIMING_YES.

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

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

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 
)

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: