1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-12 21:45:11 +02:00

PriorityCallbacks: Execute callbacks before Codeception's

GitPreparer now registers a "priority" register_shutdown_function
callback in order to clean up in case of a fatal error.
This commit is contained in:
Nick Liu
2018-11-01 06:55:26 -05:00
parent 6f416523c3
commit 952c6e5890
4 changed files with 54 additions and 2 deletions

View File

@@ -17,6 +17,9 @@ class GitPreparer implements Preparer
protected function setVcsInProgress()
{
// Cleanup in case of a fatal error
PriorityCallbacks::instance()->register_shutdown_function([$this, 'rollback']);
if ($this->isVcsInProgress())
{
$this->debug('Git repo shows test in progress. Probably crashed test.');