restart via API allows to copy description (#782)

This commit is contained in:
Kevin Papst
2019-05-13 17:32:01 +02:00
committed by GitHub
parent 1f5710eaba
commit bbe1f9beda
28 changed files with 250 additions and 118 deletions

View File

@@ -198,6 +198,32 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
);
}
/**
* @param string $role
* @param string $url
* @param array $data
*/
protected function assertEntityNotFoundForDelete(string $role, string $url, array $data)
{
$client = $this->getClientForAuthenticatedUser($role);
$this->request($client, $url, 'DELETE', [], json_encode($data));
$response = $client->getResponse();
$this->assertFalse($response->isSuccessful());
$expected = [
'code' => 404,
'message' => 'Not found'
];
$this->assertEquals(404, $client->getResponse()->getStatusCode());
$this->assertEquals(
$expected,
json_decode($client->getResponse()->getContent(), true)
);
}
/**
* @param Response $response
* @param string $message