Skip to content

Commit 91bdbf8

Browse files
derrabusfabpot
authored andcommitted
Modernized deprecated PHPUnit assertion calls
1 parent 5219dba commit 91bdbf8

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Tests/BinaryFileResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function testDeleteFileAfterSend()
309309
$response->prepare($request);
310310
$response->sendContent();
311311

312-
$this->assertFileNotExists($path);
312+
$this->assertFileDoesNotExist($path);
313313
}
314314

315315
public function testAcceptRangeOnUnsafeMethods()

Tests/File/FileTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function testMove()
8383
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
8484

8585
$this->assertFileExists($targetPath);
86-
$this->assertFileNotExists($path);
86+
$this->assertFileDoesNotExist($path);
8787
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
8888

8989
@unlink($targetPath);
@@ -102,7 +102,7 @@ public function testMoveWithNewName()
102102
$movedFile = $file->move($targetDir, 'test.newname.gif');
103103

104104
$this->assertFileExists($targetPath);
105-
$this->assertFileNotExists($path);
105+
$this->assertFileDoesNotExist($path);
106106
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
107107

108108
@unlink($targetPath);
@@ -137,7 +137,7 @@ public function testMoveWithNonLatinName($filename, $sanitizedFilename)
137137
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
138138

139139
$this->assertFileExists($targetPath);
140-
$this->assertFileNotExists($path);
140+
$this->assertFileDoesNotExist($path);
141141
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
142142

143143
@unlink($targetPath);
@@ -157,7 +157,7 @@ public function testMoveToAnUnexistentDirectory()
157157
$movedFile = $file->move($targetDir);
158158

159159
$this->assertFileExists($targetPath);
160-
$this->assertFileNotExists($sourcePath);
160+
$this->assertFileDoesNotExist($sourcePath);
161161
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
162162

163163
@unlink($sourcePath);

Tests/File/UploadedFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function testMoveLocalFileIsAllowedInTestMode()
177177
$movedFile = $file->move(__DIR__.'/Fixtures/directory');
178178

179179
$this->assertFileExists($targetPath);
180-
$this->assertFileNotExists($path);
180+
$this->assertFileDoesNotExist($path);
181181
$this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
182182

183183
@unlink($targetPath);

Tests/RedirectResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testGenerateMetaRedirect()
2020
{
2121
$response = new RedirectResponse('foo.bar');
2222

23-
$this->assertRegExp('#<meta http-equiv="refresh" content="\d+;url=\'foo\.bar\'" />#', preg_replace('/\s+/', ' ', $response->getContent()));
23+
$this->assertMatchesRegularExpression('#<meta http-equiv="refresh" content="\d+;url=\'foo\.bar\'" />#', preg_replace('/\s+/', ' ', $response->getContent()));
2424
}
2525

2626
public function testRedirectResponseConstructorNullUrl()

Tests/ResponseHeaderBagTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,6 @@ public function testDateHeaderWillBeRecreatedWhenHeadersAreReplaced()
362362

363363
private function assertSetCookieHeader($expected, ResponseHeaderBag $actual)
364364
{
365-
$this->assertRegExp('#^Set-Cookie:\s+'.preg_quote($expected, '#').'$#m', str_replace("\r\n", "\n", (string) $actual));
365+
$this->assertMatchesRegularExpression('#^Set-Cookie:\s+'.preg_quote($expected, '#').'$#m', str_replace("\r\n", "\n", (string) $actual));
366366
}
367367
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy