mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-65204 phpunit: Fix valid CiBoT errors and warnings
This commit is contained in:
parent
032c75ec43
commit
6bcc5dfdb4
@ -47,7 +47,8 @@ class phpunit_constraint_object_is_equal_with_exceptions extends PHPUnit\Framewo
|
||||
/**
|
||||
* Override constructor to capture value
|
||||
*/
|
||||
public function __construct($value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false) {
|
||||
public function __construct($value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false,
|
||||
bool $ignoreCase = false) {
|
||||
parent::__construct($value, $delta, $maxDepth, $canonicalize, $ignoreCase);
|
||||
$this->capturedvalue = $value;
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ class core_completionlib_testcase extends advanced_testcase {
|
||||
* @param boolean $canonicalize
|
||||
* @param boolean $ignoreCase
|
||||
*/
|
||||
public static function assertEquals($expected, $actual, string $message = '', float $delta = 0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void {
|
||||
public static function assertEquals($expected, $actual, string $message = '', float $delta = 0, int $maxDepth = 10,
|
||||
bool $canonicalize = false, bool $ignoreCase = false): void {
|
||||
// Nasty cheating hack: prevent random failures on timemodified field.
|
||||
if (is_object($expected) and is_object($actual)) {
|
||||
if (property_exists($expected, 'timemodified') and property_exists($actual, 'timemodified')) {
|
||||
|
@ -338,7 +338,8 @@ class mod_quiz_attempt_walkthrough_from_csv_testcase extends advanced_testcase {
|
||||
$this->assertEquals((bool)$value, $attemptobj->is_finished());
|
||||
break;
|
||||
case 'summarks' :
|
||||
$this->assertEquals((float)$value, $attemptobj->get_sum_marks(), "Sum of marks of attempt {$result['quizattempt']}.");
|
||||
$this->assertEquals((float)$value, $attemptobj->get_sum_marks(),
|
||||
"Sum of marks of attempt {$result['quizattempt']}.");
|
||||
break;
|
||||
case 'quizgrade' :
|
||||
// Check quiz grades.
|
||||
|
Loading…
x
Reference in New Issue
Block a user