Skip to content

Commit

Permalink
MDL-74416 phpunit: fix generator counters reset
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak authored and lameze committed May 12, 2022
1 parent 4d48741 commit 1099b3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/testing/generator/data_generator.php
Expand Up @@ -87,10 +87,18 @@ class testing_data_generator {
* @return void
*/
public function reset() {
$this->gradecategorycounter = 0;
$this->gradeitemcounter = 0;
$this->gradeoutcomecounter = 0;
$this->usercounter = 0;
$this->categorycount = 0;
$this->cohortcount = 0;
$this->coursecount = 0;
$this->scalecount = 0;
$this->groupcount = 0;
$this->groupingcount = 0;
$this->rolecount = 0;
$this->tagcount = 0;

foreach ($this->generators as $generator) {
$generator->reset();
Expand Down

0 comments on commit 1099b3f

Please sign in to comment.