protected function addTestData()
{
$db = $this->dm->getHttpClient();
// Force empty test database
try {
$db->request('DELETE', '/' . $this->getTestDatabase() . '');
} catch (\Exception $e) {
/* Irrelevant exception */
}
$db->request('PUT', '/' . $this->getTestDatabase() . '');
// Create some "interesting" documents
$db->request('PUT', '/' . $this->getTestDatabase() . '/doc_a', json_encode(array("_id" => "doc_a", "type" => "type_a", "doctrine_metadata" => array("associations" => array("type_b", "type_c")), "type_b" => array("doc_b"), "type_c" => array("doc_d"))));
$db->request('PUT', '/' . $this->getTestDatabase() . '/doc_b', json_encode(array("_id" => "doc_b", "doctrine_metadata" => array("type" => "type_b", "associations" => array("type_c")), "type_c" => array("doc_c", "doc_d"))));
$db->request('PUT', '/' . $this->getTestDatabase() . '/doc_c', json_encode(array("_id" => "doc_c", "doctrine_metadata" => array("type" => "type_c", "associations" => array()))));
$db->request('PUT', '/' . $this->getTestDatabase() . '/doc_d', json_encode(array("_id" => "doc_d", "doctrine_metadata" => array("type" => "type_c", "associations" => array()))));
}