Page MenuHomePhabricator

CopyTest.php
No OneTemporary

CopyTest.php

<?php
namespace Sabre\DAV;
use Sabre\HTTP;
class CopyTest extends \PHPUnit_Framework_TestCase {
public function setUp() {
\Sabre\TestUtil::clearTempDir();
}
/**
* This test makes sure that a path like /foo cannot be copied into a path
* like /foo/bar/
*
* @expectedException \Sabre\DAV\Exception\Conflict
*/
public function testCopyIntoSubPath() {
$dir = new FS\Directory(SABRE_TEMPDIR);
$server = new Server($dir);
$dir->createDirectory('foo');
$request = new HTTP\Request('COPY','/foo', [
'Destination' => '/foo/bar',
]);
$response = new HTTP\ResponseMock();
$server->invokeMethod($request, $response);
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Jan 7, 7:41 PM (16 h, 24 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914158
Default Alt Text
CopyTest.php (743 B)

Event Timeline