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()