isAbsolute('/home/path')->shouldBe(true); $this->isAbsolute('home/path')->shouldBe(false); $this->isAbsolute('../home/path')->shouldBe(false); } function it_normalizes_file_path() { $this->normalize('C:\\some\other.txt')->shouldReturn('c:/some/other.txt'); $this->normalize('..\other.txt')->shouldReturn('../other.txt'); $this->normalize('..\other.txt')->shouldReturn('../other.txt'); $this->normalize('/home/other/../new')->shouldReturn('/home/new'); $this->normalize('/home/other/./new')->shouldReturn('/home/other/new'); } }