mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
Fixed regression on file paths in manual test sessions
This commit is contained in:
parent
2b5984a73c
commit
8aaaacc23c
@ -166,6 +166,7 @@ class TestSessionEnvironment extends Object {
|
|||||||
if(!isset($state->$k)) $state->$k = $v; // Don't overwrite stuff in $state, as that's the new state
|
if(!isset($state->$k)) $state->$k = $v; // Don't overwrite stuff in $state, as that's the new state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($state->database) && $state->database) {
|
if(isset($state->database) && $state->database) {
|
||||||
if(!DB::getConn()) {
|
if(!DB::getConn()) {
|
||||||
// No connection, so try and connect to tmpdb if it exists
|
// No connection, so try and connect to tmpdb if it exists
|
||||||
@ -377,7 +378,7 @@ class TestSessionEnvironment extends Object {
|
|||||||
* @return stdClass Data as taken from the JSON object in {@link self::loadFromFile()}
|
* @return stdClass Data as taken from the JSON object in {@link self::loadFromFile()}
|
||||||
*/
|
*/
|
||||||
public function getState() {
|
public function getState() {
|
||||||
$path = Director::getAbsFile($this->config()->test_state_file);
|
$path = Director::getAbsFile($this->getFilePath());
|
||||||
return (file_exists($path)) ? json_decode(file_get_contents($path)) : new stdClass;
|
return (file_exists($path)) ? json_decode(file_get_contents($path)) : new stdClass;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user