Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
litmanowicziv committed Sep 18, 2016
1 parent d6cea7e commit 9de5133
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/EnvTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace tests;

set_include_path("./../". PATH_SEPARATOR . ini_get("include_path"));

require_once 'vendor/autoload.php';
require_once 'src/Env.php';

use DataPipeline\Env;

class EnvTest extends \PHPUnit_Framework_TestCase {

public function testEmptyEnv() {
$test = new Env();
$this->assertEmpty($test->getEnv());
}

public function testIsDebugEnv() {
$env = array("debug" => "test,print");
$this->assertEquals(ENV_DEBUG | ENV_DEBUG_TESTED | ENV_DEBUG_PRINTED, (new Env($env))->isDebugEnv());
$this->assertFalse((new Env())->isDebugEnv());
}

}

0 comments on commit 9de5133

Please sign in to comment.