public static function join($path1, $path2) { $ds = DIRECTORY_SEPARATOR; return str_replace("{$ds}{$ds}", $ds, implode($ds, array_filter(func_get_args()))); }
public function testJoin() { $path = "foo" . DIRECTORY_SEPARATOR . "bar"; $this->assertEquals($path, Utils::join('foo', 'bar')); }