Fixed Symfony 5.1 compatibility

This commit is contained in:
Igor Scheller 2020-06-01 12:25:30 +02:00
parent 50434927bc
commit 4a6f18d41f
2 changed files with 8 additions and 3 deletions

View File

@ -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"

View File

@ -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')