API endpoint for Timesheet entries (#332)
This commit is contained in:
@@ -82,11 +82,12 @@ abstract class ControllerBaseTest extends WebTestCase
|
||||
* @param string $url
|
||||
* @param string $method
|
||||
* @param array $parameters
|
||||
* @param string $content
|
||||
* @return \Symfony\Component\DomCrawler\Crawler
|
||||
*/
|
||||
protected function request(Client $client, string $url, $method = 'GET', array $parameters = [])
|
||||
protected function request(Client $client, string $url, $method = 'GET', array $parameters = [], string $content = null)
|
||||
{
|
||||
return $client->request($method, $this->createUrl($url), $parameters);
|
||||
return $client->request($method, $this->createUrl($url), $parameters, [], [], $content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,6 +39,14 @@ class HelpControllerTest extends ControllerBaseTest
|
||||
$this->assertContains('<a href="/en/help/">Back</a>', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testMissingPage()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser();
|
||||
$this->request($client, '/help/foo');
|
||||
$this->assertFalse($client->getResponse()->isSuccessful());
|
||||
$this->assertEquals(404, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testValidateRouteDoesNotAllowSpecialChars()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser();
|
||||
|
||||
Reference in New Issue
Block a user