Skip to content

Commit

Permalink
minor #33071 Fix deprecation test on master (jderusse)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.0-dev branch.

Discussion
----------

Fix deprecation test on master

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32844
| License       | MIT
| Doc PR        | NA

Fix PHPUnit 8 deprecations in master branch

nb: `master` should have been identical to `4.4` but a part of code have been migrated in #31899

Commits
-------

d2f7c6c Fix deprecation test on master
  • Loading branch information
nicolas-grekas committed Aug 8, 2019
2 parents 742b6b8 + d2f7c6c commit 1b29bb4
Showing 1 changed file with 12 additions and 12 deletions.
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 1b29bb4

Please sign in to comment.