[ 'xml' => << /remote.php/dav/files/admin/Friendica_test/97/18/ Mon, 30 Aug 2021 12:58:54 GMT 45017 59180834349 "612cd60ec9fd5" HTTP/1.1 200 OK /remote.php/dav/files/admin/Friendica_test/97/18/4d9d36f614dc005756bdfb9abbf1d8d24aa9ae842e5d6b5e7eb1dafbe767 Mon, 30 Aug 2021 12:58:54 GMT 45017 "4f7a144092532141d0e6b925e50a896e" application/octet-stream HTTP/1.1 200 OK HTTP/1.1 404 Not Found EOF, 'assertionCount' => 2, ], 'onlyDir' => [ 'xml' => << /remote.php/dav/files/admin/Friendica_test/34/cf/ Sun, 05 Sep 2021 17:56:05 GMT 0 59182800697 "613504b55db4f" HTTP/1.1 200 OK EOF, 'assertionCount' => 1, ], ]; } /** * @dataProvider dataMultiStatus */ public function testMultistatus(string $xml, int $assertionCount) { $responseDoc = new \DOMDocument(); $responseDoc->loadXML($xml); $xpath = new \DOMXPath($responseDoc); $xpath->registerNamespace('d', 'DAV'); self::assertCount($assertionCount, $xpath->query('//d:multistatus/d:response')); } }