$url = $request->query->get('url', '');
if (empty($url)) {
- throw $this->createAccessDeniedException('URL is empty?, logged user id: '.$this->getUser->getId());
+ throw $this->createAccessDeniedException('URL is empty?, logged user id: '.$this->getUser()->getId());
}
$res = $this->getDoctrine()
$this->assertEquals(false, $content['exists']);
}
+
+ public function testGetEntriesExistsWithNoUrl()
+ {
+ $this->client->request('GET', '/api/entries/exists?url=');
+
+ $this->assertEquals(403, $this->client->getResponse()->getStatusCode());
+ }
}