Beispiel #1
0
 public function testGetDirectory()
 {
     $this->given($script = new mock\script($name = uniqid()))->and($script->setAdapter($adapter = new atoum\test\adapter()))->and($adapter->is_dir = true)->and($adapter->dirname = $directory = uniqid())->then->string($script->getDirectory())->isEqualTo($directory . DIRECTORY_SEPARATOR)->if($adapter->dirname = $directory . DIRECTORY_SEPARATOR)->then->string($script->getDirectory())->isEqualTo($directory . DIRECTORY_SEPARATOR)->if($adapter->is_dir = false)->and($adapter->getcwd = $currentDirectory = uniqid())->then->string($script->getDirectory())->isEqualTo($currentDirectory . DIRECTORY_SEPARATOR)->and($adapter->getcwd = $currentDirectory . DIRECTORY_SEPARATOR)->then->string($script->getDirectory())->isEqualTo($currentDirectory . DIRECTORY_SEPARATOR);
 }