getDirectorySeparator() public method

Example #1
0
 public function test__construct()
 {
     $this->given($value = uniqid())->then->if($path = new testedClass(DIRECTORY_SEPARATOR))->then->string($path->getDirectorySeparator())->isEqualTo(DIRECTORY_SEPARATOR)->castToString($path)->isEqualTo(DIRECTORY_SEPARATOR)->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value))->then->string($path->getDirectorySeparator())->isEqualTo(DIRECTORY_SEPARATOR)->castToString($path)->isEqualTo($value)->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value, '\\'))->then->string($path->getDirectorySeparator())->isEqualTo('\\')->castToString($path)->isEqualTo($value)->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value, '/'))->then->string($path->getDirectorySeparator())->isEqualTo('/')->castToString($path)->isEqualTo($value)->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value . DIRECTORY_SEPARATOR))->then->castToString($path)->isEqualTo($value)->string($path->getDirectorySeparator())->isEqualTo(DIRECTORY_SEPARATOR)->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value . '/', '/'))->then->castToString($path)->isEqualTo($value)->string($path->getDirectorySeparator())->isEqualTo('/')->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value . '/', '\\'))->then->castToString($path)->isEqualTo($value)->string($path->getDirectorySeparator())->isEqualTo('\\')->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value . '\\', '\\'))->then->castToString($path)->isEqualTo($value)->string($path->getDirectorySeparator())->isEqualTo('\\')->object($path->getAdapter())->isEqualTo(new atoum\adapter())->if($path = new testedClass($value, '\\', $adapter = new atoum\adapter()))->then->castToString($path)->isEqualTo($value)->string($path->getDirectorySeparator())->isEqualTo('\\')->object($path->getAdapter())->isIdenticalTo($adapter)->if($path = new testedClass('C:\\'))->then->castToString($path)->isEqualTo('C:' . DIRECTORY_SEPARATOR)->string($path->getDirectorySeparator())->isEqualTo(DIRECTORY_SEPARATOR)->object($path->getAdapter())->isEqualTo(new atoum\adapter());
 }