setDirectorySeparator() public static method

public static setDirectorySeparator ( $stream, $directorySeparator = DIRECTORY_SEPARATOR )
示例#1
0
 public function testSetDirectorySeparator()
 {
     $this->string(mock\stream::setDirectorySeparator('foo/bar', '/'))->isEqualTo('foo/bar')->string(mock\stream::setDirectorySeparator('foo\\bar', '/'))->isEqualTo('foo/bar')->string(mock\stream::setDirectorySeparator('foo/bar', '\\'))->isEqualTo('foo\\bar')->string(mock\stream::setDirectorySeparator('foo\\bar', '\\'))->isEqualTo('foo\\bar')->string(mock\stream::setDirectorySeparator('foo' . DIRECTORY_SEPARATOR . 'bar'))->isEqualTo('foo' . DIRECTORY_SEPARATOR . 'bar')->string(mock\stream::setDirectorySeparator('foo' . (DIRECTORY_SEPARATOR == '/' ? '\\' : '/') . 'bar'))->isEqualTo('foo' . DIRECTORY_SEPARATOR . 'bar');
 }