fkooman\RemoteStorage\RemoteStorageServiceTest::testDeleteNonMatchingVersion PHP Method

testDeleteNonMatchingVersion() public method

    public function testDeleteNonMatchingVersion()
    {
        $request = $this->getPutRequest('/admin/foo/bar/baz.txt');
        $response = $this->r->run($request);
        $request = $this->getDeleteRequest('/admin/foo/bar/baz.txt', array('If-Match' => '"non-matching-version"'));
        $response = $this->r->run($request);
        $this->assertSame(array('HTTP/1.1 412 Precondition Failed', 'Content-Type: application/json', 'Content-Length: 28', 'Access-Control-Allow-Origin: *', 'Access-Control-Expose-Headers: ETag, Content-Length', 'Expires: 0', 'Cache-Control: no-cache', '', '{"error":"version mismatch"}'), $response->toArray());
    }