Пример #1
0
 public function testIsAbsolutePath()
 {
     $this->assertTrue(FajrUtils::isAbsolutePath('/'), 'Unix filesystem root is absolute');
     $this->assertTrue(FajrUtils::isAbsolutePath('/foo'), '/foo is absolute');
     $this->assertTrue(FajrUtils::isAbsolutePath('/foo/bar/'), '/foo/bar is absolute');
     $this->assertTrue(FajrUtils::isAbsolutePath('C:\\'), 'C:\\ is absolute');
     $this->assertTrue(FajrUtils::isAbsolutePath('\\\\servername\\folder'), '\\\\servername\\folder UNC path is absolute');
     $this->assertFalse(FajrUtils::isAbsolutePath('foo'), 'foo is relative');
     $this->assertFalse(FajrUtils::isAbsolutePath('./'), './ is relative');
 }