summaryrefslogtreecommitdiff
path: root/tests/Unit
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-09-25 00:03:22 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-09-25 01:16:12 +0200
commit449e2cdd00632acff63bb75c5282c3aa2642b59f (patch)
treec677b8d03f0287b4a9cdc2deb2e59a63414085e3 /tests/Unit
parentc5c0a602aab908ed7bac3a87b7a574bef0a5ed8f (diff)
Added env function, added GitLab CI code coverage config
Diffstat (limited to 'tests/Unit')
-rw-r--r--tests/Unit/HelpersTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Unit/HelpersTest.php b/tests/Unit/HelpersTest.php
index d9782888..9ec824af 100644
--- a/tests/Unit/HelpersTest.php
+++ b/tests/Unit/HelpersTest.php
@@ -54,6 +54,20 @@ class HelpersTest extends TestCase
}
/**
+ * @covers \env
+ */
+ public function testEnv()
+ {
+ putenv('envTestVar=someContent');
+
+ $env = env('envTestVar');
+ $this->assertEquals('someContent', $env);
+
+ $env = env('someRandomEnvVarThatShouldNeverExist', 'someDefaultValue');
+ $this->assertEquals('someDefaultValue', $env);
+ }
+
+ /**
* @covers \request
*/
public function testRequest()