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:
Rajesh Taneja
2016-07-26 10:11:30 +08:00
parent 165b70a16a
commit 52f3e060e4
80 changed files with 806 additions and 560 deletions
@@ -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]);
}
}