Fixed Symfony 5.1 compatibility

main
Igor Scheller 5 years ago
parent 50434927bc
commit 4a6f18d41f

@ -41,6 +41,7 @@
"respect/validation": "^1.1", "respect/validation": "^1.1",
"swiftmailer/swiftmailer": "^6.2", "swiftmailer/swiftmailer": "^6.2",
"symfony/http-foundation": "^5.0", "symfony/http-foundation": "^5.0",
"symfony/mime": "^5.1",
"symfony/psr-http-message-bridge": "^2.0", "symfony/psr-http-message-bridge": "^2.0",
"twig/twig": "^3.0", "twig/twig": "^3.0",
"vlucas/phpdotenv": "^4.1" "vlucas/phpdotenv": "^4.1"

@ -151,11 +151,15 @@ class NewsControllerTest extends TestCase
) { ) {
$this->request->attributes->set('id', $id); $this->request->attributes->set('id', $id);
$id = $id ?: 2; $id = $id ?: 2;
$this->request = $this->request->withParsedBody([ $body = [
'title' => 'Some Title', 'title' => 'Some Title',
'text' => $text, 'text' => $text,
'is_meeting' => $isMeeting ? '1' : null, ];
]); if ($isMeeting) {
$body['is_meeting'] = '1';
}
$this->request = $this->request->withParsedBody($body);
$this->addUser(); $this->addUser();
$this->auth->expects($this->once()) $this->auth->expects($this->once())
->method('can') ->method('can')

Loading…
Cancel
Save