mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 15:05:32 +00:00
Prevent undefined method on error
This commit is contained in:
parent
3d1ea1d7f1
commit
21b05999ee
@ -72,8 +72,8 @@ class SilverStripeAwareInitializer implements InitializerInterface
|
|||||||
));
|
));
|
||||||
|
|
||||||
$state = $testEnv->getState();
|
$state = $testEnv->getState();
|
||||||
$this->databaseName = $state->database;
|
|
||||||
|
|
||||||
|
$this->databaseName = $state->database;
|
||||||
$this->testSessionEnvironment = $testEnv;
|
$this->testSessionEnvironment = $testEnv;
|
||||||
|
|
||||||
file_put_contents('php://stdout', "Temp Database: $this->databaseName" . PHP_EOL . PHP_EOL);
|
file_put_contents('php://stdout', "Temp Database: $this->databaseName" . PHP_EOL . PHP_EOL);
|
||||||
@ -83,11 +83,13 @@ class SilverStripeAwareInitializer implements InitializerInterface
|
|||||||
|
|
||||||
public function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
file_put_contents('php://stdout', "Killing test session environment...");
|
file_put_contents('php://stdout', "Killing test session environment...");
|
||||||
|
|
||||||
$this->testSessionEnvironment->endTestSession();
|
if($this->testSessionEnvironment) {
|
||||||
|
$this->testSessionEnvironment->endTestSession();
|
||||||
|
}
|
||||||
|
|
||||||
file_put_contents('php://stdout', " done!" . PHP_EOL);
|
file_put_contents('php://stdout', " done!" . PHP_EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user