"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/DAV/Browser/PluginTest.php" between
dav-4.0.2.tar.gz and dav-4.0.3.tar.gz

About: sabre/dav is a WebDAV framework for PHP allowing to create WebDAV, CalDAV and CardDAV servers.

PluginTest.php  (dav-4.0.2):PluginTest.php  (dav-4.0.3)
skipping to change at line 151 skipping to change at line 151
$this->assertTrue(is_dir(SABRE_TEMPDIR.'/new_collection')); $this->assertTrue(is_dir(SABRE_TEMPDIR.'/new_collection'));
} }
public function testGetAsset() public function testGetAsset()
{ {
$request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=favico n.ico'); $request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=favico n.ico');
$this->server->httpRequest = $request; $this->server->httpRequest = $request;
$this->server->exec(); $this->server->exec();
$this->assertEquals(200, $this->response->getStatus(), 'Error: '.$this-> response->body); $this->assertEquals(200, $this->response->getStatus(), 'Error: '.$this-> response->getBodyAsString());
$this->assertEquals([ $this->assertEquals([
'X-Sabre-Version' => [DAV\Version::VERSION], 'X-Sabre-Version' => [DAV\Version::VERSION],
'Content-Type' => ['image/vnd.microsoft.icon'], 'Content-Type' => ['image/vnd.microsoft.icon'],
'Content-Length' => ['4286'], 'Content-Length' => ['4286'],
'Cache-Control' => ['public, max-age=1209600'], 'Cache-Control' => ['public, max-age=1209600'],
'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; s tyle-src 'self'; font-src 'self';"], 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; s tyle-src 'self'; font-src 'self';"],
], $this->response->getHeaders()); ], $this->response->getHeaders());
} }
public function testGetAsset404() public function testGetAsset404()
{ {
$request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=flavic on.ico'); $request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=flavic on.ico');
$this->server->httpRequest = $request; $this->server->httpRequest = $request;
$this->server->exec(); $this->server->exec();
$this->assertEquals(404, $this->response->getStatus(), 'Error: '.$this-> response->body); $this->assertEquals(404, $this->response->getStatus(), 'Error: '.$this-> response->getBodyAsString());
} }
public function testGetAssetEscapeBasePath() public function testGetAssetEscapeBasePath()
{ {
$request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=./../a ssets/favicon.ico'); $request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=./../a ssets/favicon.ico');
$this->server->httpRequest = $request; $this->server->httpRequest = $request;
$this->server->exec(); $this->server->exec();
$this->assertEquals(404, $this->response->getStatus(), 'Error: '.$this-> response->body); $this->assertEquals(404, $this->response->getStatus(), 'Error: '.$this-> response->getBodyAsString());
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)