MDL-55091 phpunit: Following has been deprecated.
1. getMock() 2. setExpectedException() 3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation 4. beStrictAboutTestSize renamed to enforceTimeLimit 5. UnitTestCase class is now fully removed.
This commit is contained in:
@@ -104,8 +104,10 @@ class question_attempt_step_iterator_test extends advanced_testcase {
|
||||
$this->assertFalse(isset($this->iterator[3]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException moodle_exception
|
||||
*/
|
||||
public function test_offsetGet_before_start() {
|
||||
$this->setExpectedException('moodle_exception');
|
||||
$step = $this->iterator[-1];
|
||||
}
|
||||
|
||||
@@ -119,18 +121,24 @@ class question_attempt_step_iterator_test extends advanced_testcase {
|
||||
$this->assertEquals(2, $step->get_qt_var('i'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException moodle_exception
|
||||
*/
|
||||
public function test_offsetGet_past_end() {
|
||||
$this->setExpectedException('moodle_exception');
|
||||
$step = $this->iterator[3];
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException moodle_exception
|
||||
*/
|
||||
public function test_cannot_set() {
|
||||
$this->setExpectedException('moodle_exception');
|
||||
$this->iterator[0] = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException moodle_exception
|
||||
*/
|
||||
public function test_cannot_unset() {
|
||||
$this->setExpectedException('moodle_exception');
|
||||
unset($this->iterator[2]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user