Implement storage defaulting to the old one and required when using as PHAR

This commit is contained in:
Niklas Keller
2016-03-23 19:33:26 +01:00
parent 1a06a5cadf
commit 9ea97f18e1
6 changed files with 74 additions and 16 deletions

View File

@@ -15,4 +15,15 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase {
$this->assertSame("acme", suggestCommand("acme!", ["acme"]));
$this->assertSame("", suggestCommand("issue", ["acme"]));
}
public function testIsPhar() {
$this->assertFalse(isPhar());
}
public function testNormalizePath() {
$this->assertSame("/etc/foobar", normalizePath("/etc/foobar"));
$this->assertSame("/etc/foobar", normalizePath("/etc/foobar/"));
$this->assertSame("/etc/foobar", normalizePath("/etc/foobar/"));
$this->assertSame("C:/etc/foobar", normalizePath("C:\\etc\\foobar\\"));
}
}