ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
assAnswerClozeTest.php
Go to the documentation of this file.
1 <?php
2 
27 {
28  protected $backupGlobals = false;
29 
30  protected function setUp(): void
31  {
32  chdir(__DIR__ . '/../../../../');
33  }
34 
35  public function test_constructorShouldReturnInstance(): void
36  {
37  $instance = new assAnswerCloze();
38 
39  $this->assertInstanceOf(assAnswerCloze::class, $instance);
40  }
41 
42  public function test_setGetLowerBound(): void
43  {
44  $instance = new assAnswerCloze('2');
45 
46  $expected = '1';
47  $instance->setLowerBound($expected);
48  $actual = $instance->getLowerBound();
49 
50  $this->assertEquals($expected, $actual);
51  }
52 
54  {
55  $instance = new assAnswerCloze('2');
56 
57  $expected = '2';
58  $instance->setLowerBound(4);
59  $actual = $instance->getLowerBound();
60 
61  $this->assertEquals($expected, $actual);
62  }
63 
65  {
66  $instance = new assAnswerCloze('3');
67 
68  $expected = '3';
69  $instance->setLowerBound('test');
70  $actual = $instance->getLowerBound();
71 
72  $this->assertEquals($expected, $actual);
73  }
74 
75  public function test_setGetUpperBound(): void
76  {
77  $instance = new assAnswerCloze('1');
78 
79  $expected = '3';
80  $instance->setUpperBound($expected);
81  $actual = $instance->getUpperBound();
82 
83  $this->assertEquals($expected, $actual);
84  }
85 
87  {
88  $instance = new assAnswerCloze('4');
89 
90  $expected = '4';
91  $instance->setUpperBound(2);
92  $actual = $instance->getUpperBound();
93 
94  $this->assertEquals($expected, $actual);
95  }
96 
98  {
99  $instance = new assAnswerCloze('4');
100 
101  $expected = '4';
102  $instance->setUpperBound('test');
103  $actual = $instance->getUpperBound();
104 
105  $this->assertEquals($expected, $actual);
106  }
107 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class assBaseTestCase.
test_setGetUpperBound_nonNumericShouldSetAnswertext()
test_setGetLowerBound_nonNumericShouldSetAnswertext()
test_setGetUpperBound_smallerThanAnswerShouldSetAnswertext()
test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...