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
@@ -87,8 +87,10 @@ class question_attempt_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[0];
}
@@ -100,18 +102,24 @@ class question_attempt_iterator_test extends advanced_testcase {
$this->assertSame($this->qas[2], $this->iterator[2]);
}
/**
* @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]);
}
}