public function testDeleteDocument()
{
$p = new Path('/admin/messages/foo/baz.txt');
$this->r->putDocument($p, 'text/plain', 'Hello World!');
$documentVersion = $this->r->getVersion($p);
$this->r->deleteDocument($p, array($documentVersion));
$this->assertNull($this->r->getVersion($p));
try {
$this->r->getDocument($p);
$this->assertTrue(false);
} catch (DocumentStorageException $e) {
$this->assertTrue(true);
}
// directory should also not be there anymore
$p = new Path('/admin/messages/foo/');
$this->assertNull($this->r->getVersion($p));
}