Fixed Symfony 5.1 compatibility
This commit is contained in:
parent
50434927bc
commit
4a6f18d41f
|
@ -41,6 +41,7 @@
|
|||
"respect/validation": "^1.1",
|
||||
"swiftmailer/swiftmailer": "^6.2",
|
||||
"symfony/http-foundation": "^5.0",
|
||||
"symfony/mime": "^5.1",
|
||||
"symfony/psr-http-message-bridge": "^2.0",
|
||||
"twig/twig": "^3.0",
|
||||
"vlucas/phpdotenv": "^4.1"
|
||||
|
|
|
@ -151,11 +151,15 @@ class NewsControllerTest extends TestCase
|
|||
) {
|
||||
$this->request->attributes->set('id', $id);
|
||||
$id = $id ?: 2;
|
||||
$this->request = $this->request->withParsedBody([
|
||||
$body = [
|
||||
'title' => 'Some Title',
|
||||
'text' => $text,
|
||||
'is_meeting' => $isMeeting ? '1' : null,
|
||||
]);
|
||||
];
|
||||
if ($isMeeting) {
|
||||
$body['is_meeting'] = '1';
|
||||
}
|
||||
|
||||
$this->request = $this->request->withParsedBody($body);
|
||||
$this->addUser();
|
||||
$this->auth->expects($this->once())
|
||||
->method('can')
|
||||
|
|
Loading…
Reference in New Issue