mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-65220 behat: test scenarios sometimes do not clear database data
This commit is contained in:
parent
0920f35ed9
commit
f7af1e0b9c
1 changed files with 3 additions and 4 deletions
|
@ -926,12 +926,11 @@ abstract class testing_util {
|
||||||
|
|
||||||
if (defined('BEHAT_SITE_RUNNING')) {
|
if (defined('BEHAT_SITE_RUNNING')) {
|
||||||
$tablesupdatedfile = self::get_tables_updated_by_scenario_list_path();
|
$tablesupdatedfile = self::get_tables_updated_by_scenario_list_path();
|
||||||
if ($tablesupdated = @json_decode(file_get_contents($tablesupdatedfile), true)) {
|
$tablesupdated = @json_decode(file_get_contents($tablesupdatedfile), true);
|
||||||
$tablesupdated[$table] = true;
|
if (!isset($tablesupdated[$table])) {
|
||||||
} else {
|
|
||||||
$tablesupdated[$table] = true;
|
$tablesupdated[$table] = true;
|
||||||
|
@file_put_contents($tablesupdatedfile, json_encode($tablesupdated, JSON_PRETTY_PRINT));
|
||||||
}
|
}
|
||||||
@file_put_contents($tablesupdatedfile, json_encode($tablesupdated, JSON_PRETTY_PRINT));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue