From d2f7c6c19ce7864566e666a1957ddcd5db1404db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Thu, 8 Aug 2019 23:06:15 +0200 Subject: [PATCH] Fix deprecation test on master --- .../Controller/AbstractControllerTest.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php index 77769e1e98d9..88bcd35d4496 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php @@ -246,8 +246,8 @@ public function testFile() if ($response->headers->get('content-type')) { $this->assertSame('text/x-php', $response->headers->get('content-type')); } - $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); - $this->assertContains(basename(__FILE__), $response->headers->get('content-disposition')); + $this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertStringContainsString(basename(__FILE__), $response->headers->get('content-disposition')); } public function testFileAsInline() @@ -262,8 +262,8 @@ public function testFileAsInline() if ($response->headers->get('content-type')) { $this->assertSame('text/x-php', $response->headers->get('content-type')); } - $this->assertContains(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition')); - $this->assertContains(basename(__FILE__), $response->headers->get('content-disposition')); + $this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition')); + $this->assertStringContainsString(basename(__FILE__), $response->headers->get('content-disposition')); } public function testFileWithOwnFileName() @@ -279,8 +279,8 @@ public function testFileWithOwnFileName() if ($response->headers->get('content-type')) { $this->assertSame('text/x-php', $response->headers->get('content-type')); } - $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); - $this->assertContains($fileName, $response->headers->get('content-disposition')); + $this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertStringContainsString($fileName, $response->headers->get('content-disposition')); } public function testFileWithOwnFileNameAsInline() @@ -296,8 +296,8 @@ public function testFileWithOwnFileNameAsInline() if ($response->headers->get('content-type')) { $this->assertSame('text/x-php', $response->headers->get('content-type')); } - $this->assertContains(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition')); - $this->assertContains($fileName, $response->headers->get('content-disposition')); + $this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition')); + $this->assertStringContainsString($fileName, $response->headers->get('content-disposition')); } public function testFileFromPath() @@ -312,8 +312,8 @@ public function testFileFromPath() if ($response->headers->get('content-type')) { $this->assertSame('text/x-php', $response->headers->get('content-type')); } - $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); - $this->assertContains(basename(__FILE__), $response->headers->get('content-disposition')); + $this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertStringContainsString(basename(__FILE__), $response->headers->get('content-disposition')); } public function testFileFromPathWithCustomizedFileName() @@ -328,8 +328,8 @@ public function testFileFromPathWithCustomizedFileName() if ($response->headers->get('content-type')) { $this->assertSame('text/x-php', $response->headers->get('content-type')); } - $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); - $this->assertContains('test.php', $response->headers->get('content-disposition')); + $this->assertStringContainsString(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertStringContainsString('test.php', $response->headers->get('content-disposition')); } public function testFileWhichDoesNotExist()