mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
Apply new CS rules on the webdav feature
This commit is contained in:
@@ -12,11 +12,11 @@ declare(strict_types=1);
|
||||
namespace Chill\DocStoreBundle\Tests\Dav\Request;
|
||||
|
||||
use Chill\DocStoreBundle\Dav\Request\PropfindRequestAnalyzer;
|
||||
use phpseclib3\Crypt\DSA\Formats\Keys\XML;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class PropfindRequestAnalyzerTest extends TestCase
|
||||
@@ -33,7 +33,7 @@ class PropfindRequestAnalyzerTest extends TestCase
|
||||
$actual = $analyzer->getRequestedProperties($request);
|
||||
|
||||
foreach ($expected as $key => $value) {
|
||||
if ($key === 'unknowns') {
|
||||
if ('unknowns' === $key) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -59,17 +59,17 @@ class PropfindRequestAnalyzerTest extends TestCase
|
||||
</propfind>
|
||||
XML,
|
||||
[
|
||||
"resourceType" => false,
|
||||
"contentType" => false,
|
||||
"lastModified" => false,
|
||||
"creationDate" => false,
|
||||
"contentLength" => false,
|
||||
"etag" => false,
|
||||
"supportedLock" => false,
|
||||
'resourceType' => false,
|
||||
'contentType' => false,
|
||||
'lastModified' => false,
|
||||
'creationDate' => false,
|
||||
'contentLength' => false,
|
||||
'etag' => false,
|
||||
'supportedLock' => false,
|
||||
'unknowns' => [
|
||||
['xmlns' => 'http://ucb.openoffice.org/dav/props/', 'prop' => 'BaseURI']
|
||||
]
|
||||
]
|
||||
['xmlns' => 'http://ucb.openoffice.org/dav/props/', 'prop' => 'BaseURI'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
yield [
|
||||
@@ -80,15 +80,15 @@ class PropfindRequestAnalyzerTest extends TestCase
|
||||
</propfind>
|
||||
XML,
|
||||
[
|
||||
"resourceType" => true,
|
||||
"contentType" => true,
|
||||
"lastModified" => true,
|
||||
"creationDate" => true,
|
||||
"contentLength" => true,
|
||||
"etag" => true,
|
||||
"supportedLock" => true,
|
||||
"unknowns" => [],
|
||||
]
|
||||
'resourceType' => true,
|
||||
'contentType' => true,
|
||||
'lastModified' => true,
|
||||
'creationDate' => true,
|
||||
'contentLength' => true,
|
||||
'etag' => true,
|
||||
'supportedLock' => true,
|
||||
'unknowns' => [],
|
||||
],
|
||||
];
|
||||
|
||||
yield [
|
||||
@@ -101,15 +101,15 @@ class PropfindRequestAnalyzerTest extends TestCase
|
||||
</propfind>
|
||||
XML,
|
||||
[
|
||||
"resourceType" => false,
|
||||
"contentType" => false,
|
||||
"lastModified" => true,
|
||||
"creationDate" => false,
|
||||
"contentLength" => false,
|
||||
"etag" => false,
|
||||
"supportedLock" => false,
|
||||
'unknowns' => []
|
||||
]
|
||||
'resourceType' => false,
|
||||
'contentType' => false,
|
||||
'lastModified' => true,
|
||||
'creationDate' => false,
|
||||
'contentLength' => false,
|
||||
'etag' => false,
|
||||
'supportedLock' => false,
|
||||
'unknowns' => [],
|
||||
],
|
||||
];
|
||||
|
||||
yield [
|
||||
@@ -118,17 +118,17 @@ class PropfindRequestAnalyzerTest extends TestCase
|
||||
<propfind xmlns="DAV:"><prop><resourcetype xmlns="DAV:"/><IsReadOnly xmlns="http://ucb.openoffice.org/dav/props/"/><getcontenttype xmlns="DAV:"/><supportedlock xmlns="DAV:"/></prop></propfind>
|
||||
XML,
|
||||
[
|
||||
"resourceType" => true,
|
||||
"contentType" => true,
|
||||
"lastModified" => false,
|
||||
"creationDate" => false,
|
||||
"contentLength" => false,
|
||||
"etag" => false,
|
||||
"supportedLock" => false,
|
||||
'resourceType' => true,
|
||||
'contentType' => true,
|
||||
'lastModified' => false,
|
||||
'creationDate' => false,
|
||||
'contentLength' => false,
|
||||
'etag' => false,
|
||||
'supportedLock' => false,
|
||||
'unknowns' => [
|
||||
['xmlns' => 'http://ucb.openoffice.org/dav/props/', 'prop' => 'IsReadOnly']
|
||||
]
|
||||
]
|
||||
['xmlns' => 'http://ucb.openoffice.org/dav/props/', 'prop' => 'IsReadOnly'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user