From a7d2bcf88b855af7fb101f2388f9f4a3d2cf0281 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 31 Oct 2017 15:13:37 +0100 Subject: Fixed ConfigServiceProviderTest when no config file has been created --- tests/Unit/Config/ConfigServiceProviderTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/Unit/Config') diff --git a/tests/Unit/Config/ConfigServiceProviderTest.php b/tests/Unit/Config/ConfigServiceProviderTest.php index ab6fa67f..c8be4b7d 100644 --- a/tests/Unit/Config/ConfigServiceProviderTest.php +++ b/tests/Unit/Config/ConfigServiceProviderTest.php @@ -29,7 +29,17 @@ class ConfigServiceProviderTest extends ServiceProviderTest $this->setExpects($config, 'set', null, null, $this->exactly(2)); $this->setExpects($config, 'get', [null], []); + $configFile = __DIR__ . '/../../../config/config.php'; + $configExists = file_exists($configFile); + if (!$configExists) { + file_put_contents($configFile, 'register(); + + if (!$configExists) { + unlink($configFile); + } } } -- cgit v1.2.3-54-g00ecf