1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-03 19:31:02 +01:00

Destroy fixture explicitly

Summary:
Unittest databases are not always destroyed in our setup.
It could be caused by `__destruct()` not called in case of a fatal error.

Test Plan:
  arc unit src/applications/calendar/storage/holiday

Reviewers: edward, epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2568
This commit is contained in:
vrana 2012-05-24 15:35:49 -07:00
parent 0da0632242
commit 96f725009f

View file

@ -32,9 +32,12 @@ final class PhabricatorStorageFixtureScopeGuard {
$this->name); $this->name);
PhabricatorLiskDAO::pushStorageNamespace($name); PhabricatorLiskDAO::pushStorageNamespace($name);
// Destructor is not called with fatal error.
register_shutdown_function(array($this, 'destroy'));
} }
public function __destruct() { public function destroy() {
PhabricatorLiskDAO::popStorageNamespace(); PhabricatorLiskDAO::popStorageNamespace();
execx( execx(