Skip to content

Commit

Permalink
[auto-generated] Update plugin files
Browse files Browse the repository at this point in the history
Check out the commits that caused these changes: moodlehq/moodleapp@b1f1691...ea44d5c
  • Loading branch information
github-actions[bot] committed May 31, 2023
1 parent 80234cb commit 049d185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/behat/behat_performance.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ public function i_stop_measuring(string $name) {
*
* @Then /^"([^"]+)" should have taken (less than|more than|exactly) (\d+(?:\.\d+)? (?:seconds|milliseconds))$/
*/
public function timing_should_have_taken(string $measure, Closure $comparison, float $expectedtime) {
public function timing_should_have_taken(string $measure, string $comparison, string $expectedtime) {
$measuretiming = $this->get_performance_measure($measure);
$comparison = $this->parse_comparison($comparison);
$expectedtime = $this->parse_time($expectedtime);

if (!call_user_func($comparison, $measuretiming->duration, $expectedtime)) {
throw new ExpectationException(
Expand All @@ -70,11 +72,10 @@ public function timing_should_have_taken(string $measure, Closure $comparison, f
/**
* Parse time.
*
* @Transform /^\d+(?:\.\d+)? (?:seconds|milliseconds)$/
* @param string $text Time string.
* @return float
*/
public function parse_time(string $text): float {
private function parse_time(string $text): float {
$spaceindex = strpos($text, ' ');
$value = floatval(substr($text, 0, $spaceindex));

Expand All @@ -88,11 +89,10 @@ public function parse_time(string $text): float {
/**
* Parse a comparison function.
*
* @Transform /^less than|more than|exactly$/
* @param string $text Comparison string.
* @return Closure
*/
public function parse_comparison(string $text): Closure {
private function parse_comparison(string $text): Closure {
switch ($text) {
case 'less than':
return function ($a, $b) {
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2023051600;
$plugin->version = 2023053100;
$plugin->requires = 2016052300;
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '4.2.0';
Expand Down

0 comments on commit 049d185

Please sign in to comment.