public function cannot_move_file_to_spool()
{
global $mockRename;
$mockRename = true;
$tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . microtime(true);
$spoolDir = $tmpDir . DIRECTORY_SEPARATOR . 'spool';
if (@mkdir($tmpDir, 0755, true) === false) {
$this->fail('Could not create temporary directory');
}
if (@mkdir($spoolDir . DIRECTORY_SEPARATOR . 'outgoing', 0755, true) === false) {
$this->fail('Could not create temporary spool directory');
}
$props = array('tmpDir' => $tmpDir, 'spoolDir' => $spoolDir);
$call = new \PAGI\CallSpool\CallFile(new \PAGI\DialDescriptor\SIPDialDescriptor('target', 'provider'));
$spool = \PAGI\CallSpool\Impl\CallSpoolImpl::getInstance($props);
$spool->spool($call, 12);
}