mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
add condition to prevent running endTestSession() twice
reformatted with space indent
This commit is contained in:
parent
12552dc808
commit
ba103ca8fc
@ -83,14 +83,14 @@ class SilverStripeAwareInitializer implements InitializerInterface
|
|||||||
|
|
||||||
public function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
file_put_contents('php://stdout', "Killing test session environment...");
|
// Add condition here as register_shutdown_function() also calls this in __construct()
|
||||||
|
|
||||||
if($this->testSessionEnvironment) {
|
if($this->testSessionEnvironment) {
|
||||||
|
file_put_contents('php://stdout', "Killing test session environment...");
|
||||||
$this->testSessionEnvironment->endTestSession();
|
$this->testSessionEnvironment->endTestSession();
|
||||||
}
|
$this->testSessionEnvironment = null;
|
||||||
|
|
||||||
file_put_contents('php://stdout', " done!" . PHP_EOL);
|
file_put_contents('php://stdout', " done!" . PHP_EOL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if initializer supports provided context.
|
* Checks if initializer supports provided context.
|
||||||
|
Loading…
Reference in New Issue
Block a user