MDL-81553 phpunit: Move controller->destroy() to after its needed
We need to cleanup the controller _after_ we're using the step related to it. Destroying it before reintroduces the original issue from MDL-80553.
This commit is contained in:
@@ -71,11 +71,11 @@ class backup_stepslib_test extends \advanced_testcase {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$bc->destroy();
|
||||
|
||||
$reflection = new \ReflectionClass($step);
|
||||
$method = $reflection->getMethod('define_structure');
|
||||
$structure = $method->invoke($step);
|
||||
$bc->destroy();
|
||||
|
||||
$elements = $structure->get_final_elements();
|
||||
$this->assertArrayHasKey('number', $elements);
|
||||
|
||||
Reference in New Issue
Block a user