From 7e5ce59a250af37fd55e0aada95dca2154286670 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Fri, 6 Apr 2018 11:12:38 +0200 Subject: [PATCH] Use the ApiContext returned from the auto install. (bunq/sdk_php#126) --- tests/BunqSdkTestBase.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/BunqSdkTestBase.php b/tests/BunqSdkTestBase.php index a86addb1..1ebcb0b3 100644 --- a/tests/BunqSdkTestBase.php +++ b/tests/BunqSdkTestBase.php @@ -88,19 +88,17 @@ class BunqSdkTestBase extends TestCase */ public static function setUpBeforeClass() { - static::createApiContext(); BunqContext::loadApiContext( - ApiContext::restore(self::FILE_PATH_CONTEXT_CONFIG) + static::createApiContext() ); } /** */ - protected static function createApiContext() + protected static function createApiContext(): ApiContext { - InstallationUtil::automaticInstall( - BunqEnumApiEnvironmentType::SANDBOX(), - self::FILE_PATH_CONTEXT_CONFIG + return InstallationUtil::automaticInstall( + BunqEnumApiEnvironmentType::SANDBOX() ); }