Skip to content

Commit 7b4626a

Browse files
committed
Remove unused local variables in tests
1 parent 4db558c commit 7b4626a

7 files changed

+11
-11
lines changed

Tests/File/UploadedFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function testMoveLocalFileIsNotAllowed()
153153
UPLOAD_ERR_OK
154154
);
155155

156-
$movedFile = $file->move(__DIR__.'/Fixtures/directory');
156+
$file->move(__DIR__.'/Fixtures/directory');
157157
}
158158

159159
public function testMoveLocalFileIsAllowedInTestMode()

Tests/HeaderBagTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testGetDateException()
5959
{
6060
$this->expectException('RuntimeException');
6161
$bag = new HeaderBag(['foo' => 'Tue']);
62-
$headerDate = $bag->getDate('foo');
62+
$bag->getDate('foo');
6363
}
6464

6565
public function testGetCacheControlHeader()

Tests/RedirectResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ public function testGenerateMetaRedirect()
2929
public function testRedirectResponseConstructorNullUrl()
3030
{
3131
$this->expectException('InvalidArgumentException');
32-
$response = new RedirectResponse(null);
32+
new RedirectResponse(null);
3333
}
3434

3535
public function testRedirectResponseConstructorWrongStatusCode()
3636
{
3737
$this->expectException('InvalidArgumentException');
38-
$response = new RedirectResponse('foo.bar', 404);
38+
new RedirectResponse('foo.bar', 404);
3939
}
4040

4141
public function testGenerateLocationHeader()

Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testConstruct()
4141
*/
4242
public function testConstructSavePath($savePath, $expectedSavePath, $path)
4343
{
44-
$handler = new NativeFileSessionHandler($savePath);
44+
new NativeFileSessionHandler($savePath);
4545
$this->assertEquals($expectedSavePath, ini_get('session.save_path'));
4646
$this->assertDirectoryExists(realpath($path));
4747

@@ -62,13 +62,13 @@ public function savePathDataProvider()
6262
public function testConstructException()
6363
{
6464
$this->expectException('InvalidArgumentException');
65-
$handler = new NativeFileSessionHandler('something;invalid;with;too-many-args');
65+
new NativeFileSessionHandler('something;invalid;with;too-many-args');
6666
}
6767

6868
public function testConstructDefault()
6969
{
7070
$path = ini_get('session.save_path');
71-
$storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler());
71+
new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler());
7272

7373
$this->assertEquals($path, ini_get('session.save_path'));
7474
}

Tests/Session/Storage/Handler/NullSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class NullSessionHandlerTest extends TestCase
2828
{
2929
public function testSaveHandlers()
3030
{
31-
$storage = $this->getStorage();
31+
$this->getStorage();
3232
$this->assertEquals('user', ini_get('session.save_handler'));
3333
}
3434

Tests/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testWrongPdoErrMode()
5454
$pdo = $this->getMemorySqlitePdo();
5555
$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_SILENT);
5656

57-
$storage = new PdoSessionHandler($pdo);
57+
new PdoSessionHandler($pdo);
5858
}
5959

6060
public function testInexistentTable()

Tests/Session/Storage/NativeSessionStorageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ public function testDefaultSessionCacheLimiter()
145145
{
146146
$this->iniSet('session.cache_limiter', 'nocache');
147147

148-
$storage = new NativeSessionStorage();
148+
new NativeSessionStorage();
149149
$this->assertEquals('', ini_get('session.cache_limiter'));
150150
}
151151

152152
public function testExplicitSessionCacheLimiter()
153153
{
154154
$this->iniSet('session.cache_limiter', 'nocache');
155155

156-
$storage = new NativeSessionStorage(['cache_limiter' => 'public']);
156+
new NativeSessionStorage(['cache_limiter' => 'public']);
157157
$this->assertEquals('public', ini_get('session.cache_limiter'));
158158
}
159159

0 commit comments

Comments
 (0)