<?php
namespace Tests\Unit;

use \Dotenv;
/**
 * Dotenv Test
 * 
 * @author Leonid Mamchenkov <l.mamchenkov@qobo.biz>
 */
class DotenvTest extends \PHPUnit_Framework_TestCase {

	protected $folder;
	protected $file;

	protected function setUp() {
		$this->folder = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
		$this->file = '.env.example';
	}

	/**
	 * Check that .env.example file exists
	 */
	public function testDotenvExampleFileExists() {
		$this->assertTrue(file_exists($this->folder . $this->file), ".env.example file does not exist [" . $this->folder . $this->file . "]");
	}

	/**
	* Check that we can parse .env.example file
	*
	* @depends testDotenvExampleFileExists
	*/
	public function testDotenvExampleFileIsParseable() {
		Dotenv::load($this->folder, $this->file);
	}
}

<?php
namespace Tests\Unit;
/**
 * Dotenv Test
 * 
 * @author Leonid Mamchenkov <l.mamchenkov@qobo.biz>
 */
class DotenvTest extends \PHPUnit_Framework_TestCase {

	/**
	 * Check that .env.example file exists
	 */
	public function testDotenvExampleFileExists() {
		$file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '.env.example';
		$this->assertTrue(file_exists($file), ".env.example file does not exist [$file]");
	}

}

--- 
+++ 
@@ -1,5 +1,7 @@
 <?php
 namespace Tests\Unit;
+
+use \Dotenv;
 /**
  * Dotenv Test
  * 
@@ -7,12 +9,27 @@
  */
 class DotenvTest extends \PHPUnit_Framework_TestCase {
 
+	protected $folder;
+	protected $file;
+
+	protected function setUp() {
+		$this->folder = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
+		$this->file = '.env.example';
+	}
+
 	/**
 	 * Check that .env.example file exists
 	 */
 	public function testDotenvExampleFileExists() {
-		$file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '.env.example';
-		$this->assertTrue(file_exists($file), ".env.example file does not exist [$file]");
+		$this->assertTrue(file_exists($this->folder . $this->file), ".env.example file does not exist [" . $this->folder . $this->file . "]");
 	}
 
+	/**
+	* Check that we can parse .env.example file
+	*
+	* @depends testDotenvExampleFileExists
+	*/
+	public function testDotenvExampleFileIsParseable() {
+		Dotenv::load($this->folder, $this->file);
+	}
 }
Test parsing of .env.example file
