Skip to content

Commit

Permalink
Merge pull request #13 from netlogix/bugfix/reset-bootstrap-static-ob…
Browse files Browse the repository at this point in the history
…ject-manager

TASK: Reset Bootstrap::$staticObjectManager after functional test
  • Loading branch information
paxuclus authored Nov 8, 2021
2 parents a95ab66 + f0891db commit 0cdc358
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Tests/Functional/ThrowableStorage/CompoundStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,19 @@ public function When_Bootstrap_staticObjectManager_is_unset_the_logged_exception
]
]);

self::expectException(Test::class);
self::expectExceptionCode(1);

$staticObjectManager = Bootstrap::$staticObjectManager;
Bootstrap::$staticObjectManager = null;

$throwable = new Test('foo', 1);

self::expectException(Test::class);
self::expectExceptionCode(1);

$storage->logThrowable($throwable);
try {
$storage->logThrowable($throwable);
} finally {
Bootstrap::$staticObjectManager = $staticObjectManager;
}
}

}

0 comments on commit 0cdc358

Please sign in to comment.