public function testJoinPath() { $DS = DIRECTORY_SEPARATOR; $this->assertEquals(FajrUtils::joinPath($DS, $DS), $DS, '/,/'); $this->assertEquals(FajrUtils::joinPath('foo', $DS), 'foo', 'foo,/'); $this->assertEquals(FajrUtils::joinPath($DS, 'foo'), $DS . 'foo', '/,foo'); $this->assertEquals(FajrUtils::joinPath($DS . 'foo' . $DS, 'bar'), $DS . 'foo' . $DS . 'bar', '/foo/,bar'); $this->assertEquals(FajrUtils::joinPath('foo', 'bar'), 'foo' . $DS . 'bar', 'foo,bar'); $this->assertEquals(FajrUtils::joinPath('foo' . $DS, $DS . 'bar'), 'foo' . $DS . 'bar', 'foo/,/bar'); $this->assertEquals(FajrUtils::joinPath($DS . 'foo' . $DS, $DS . 'bar' . $DS), $DS . 'foo' . $DS . 'bar' . $DS, '/foo/,/bar/'); $this->assertEquals(FajrUtils::joinPath('', ''), '', ','); $this->assertEquals(FajrUtils::joinPath($DS, 'foo', $DS, 'bar', $DS . 'baz'), $DS . 'foo' . $DS . 'bar' . $DS . 'baz', '/,foo,/,bar,/baz'); }