Skip to content

Commit 049d185

Browse files
[auto-generated] Update plugin files
Check out the commits that caused these changes: moodlehq/moodleapp@b1f1691...ea44d5c
1 parent 80234cb commit 049d185

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/behat/behat_performance.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ public function i_stop_measuring(string $name) {
5454
*
5555
* @Then /^"([^"]+)" should have taken (less than|more than|exactly) (\d+(?:\.\d+)? (?:seconds|milliseconds))$/
5656
*/
57-
public function timing_should_have_taken(string $measure, Closure $comparison, float $expectedtime) {
57+
public function timing_should_have_taken(string $measure, string $comparison, string $expectedtime) {
5858
$measuretiming = $this->get_performance_measure($measure);
59+
$comparison = $this->parse_comparison($comparison);
60+
$expectedtime = $this->parse_time($expectedtime);
5961

6062
if (!call_user_func($comparison, $measuretiming->duration, $expectedtime)) {
6163
throw new ExpectationException(
@@ -70,11 +72,10 @@ public function timing_should_have_taken(string $measure, Closure $comparison, f
7072
/**
7173
* Parse time.
7274
*
73-
* @Transform /^\d+(?:\.\d+)? (?:seconds|milliseconds)$/
7475
* @param string $text Time string.
7576
* @return float
7677
*/
77-
public function parse_time(string $text): float {
78+
private function parse_time(string $text): float {
7879
$spaceindex = strpos($text, ' ');
7980
$value = floatval(substr($text, 0, $spaceindex));
8081

@@ -88,11 +89,10 @@ public function parse_time(string $text): float {
8889
/**
8990
* Parse a comparison function.
9091
*
91-
* @Transform /^less than|more than|exactly$/
9292
* @param string $text Comparison string.
9393
* @return Closure
9494
*/
95-
public function parse_comparison(string $text): Closure {
95+
private function parse_comparison(string $text): Closure {
9696
switch ($text) {
9797
case 'less than':
9898
return function ($a, $b) {

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
defined('MOODLE_INTERNAL') || die;
88

9-
$plugin->version = 2023051600;
9+
$plugin->version = 2023053100;
1010
$plugin->requires = 2016052300;
1111
$plugin->maturity = MATURITY_STABLE;
1212
$plugin->release = '4.2.0';

0 commit comments

Comments
 (0)