PAGI\CallSpool\Impl\Test_CallSpool::cannot_touch_temp_file PHP Method

cannot_touch_temp_file() public method

        public function cannot_touch_temp_file()
        {
            global $mockTouch;
            $mockTouch = 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);
        }