public function testHydrateAttachments()
{
$user = $this->dm->find('Doctrine\\Tests\\Models\\CMS\\CmsUser', 'user_with_attachment');
$this->assertInstanceOf('Doctrine\\Tests\\Models\\CMS\\CmsUser', $user, 'User not hydrated correctly!');
$this->assertInternalType('array', $user->attachments, "Attachments are always an array.");
$this->assertArrayHasKey('foo.txt', $user->attachments);
$this->assertInstanceOf('Doctrine\\CouchDB\\Attachment', $user->attachments['foo.txt']);
$this->assertFalse($user->attachments['foo.txt']->isLoaded());
$this->assertEquals('This is a base64 encoded text', $user->attachments['foo.txt']->getRawData());
}