Skip to content

Commit

Permalink
Remove unused local variables in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Oct 24, 2019
1 parent 4db558c commit 7b4626a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Tests/File/UploadedFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function testMoveLocalFileIsNotAllowed()
UPLOAD_ERR_OK
);

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

public function testMoveLocalFileIsAllowedInTestMode()
Expand Down
2 changes: 1 addition & 1 deletion Tests/HeaderBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testGetDateException()
{
$this->expectException('RuntimeException');
$bag = new HeaderBag(['foo' => 'Tue']);
$headerDate = $bag->getDate('foo');
$bag->getDate('foo');
}

public function testGetCacheControlHeader()
Expand Down
4 changes: 2 additions & 2 deletions Tests/RedirectResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public function testGenerateMetaRedirect()
public function testRedirectResponseConstructorNullUrl()
{
$this->expectException('InvalidArgumentException');
$response = new RedirectResponse(null);
new RedirectResponse(null);
}

public function testRedirectResponseConstructorWrongStatusCode()
{
$this->expectException('InvalidArgumentException');
$response = new RedirectResponse('foo.bar', 404);
new RedirectResponse('foo.bar', 404);
}

public function testGenerateLocationHeader()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testConstruct()
*/
public function testConstructSavePath($savePath, $expectedSavePath, $path)
{
$handler = new NativeFileSessionHandler($savePath);
new NativeFileSessionHandler($savePath);
$this->assertEquals($expectedSavePath, ini_get('session.save_path'));
$this->assertDirectoryExists(realpath($path));

Expand All @@ -62,13 +62,13 @@ public function savePathDataProvider()
public function testConstructException()
{
$this->expectException('InvalidArgumentException');
$handler = new NativeFileSessionHandler('something;invalid;with;too-many-args');
new NativeFileSessionHandler('something;invalid;with;too-many-args');
}

public function testConstructDefault()
{
$path = ini_get('session.save_path');
$storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler());
new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler());

$this->assertEquals($path, ini_get('session.save_path'));
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Session/Storage/Handler/NullSessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class NullSessionHandlerTest extends TestCase
{
public function testSaveHandlers()
{
$storage = $this->getStorage();
$this->getStorage();
$this->assertEquals('user', ini_get('session.save_handler'));
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testWrongPdoErrMode()
$pdo = $this->getMemorySqlitePdo();
$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_SILENT);

$storage = new PdoSessionHandler($pdo);
new PdoSessionHandler($pdo);
}

public function testInexistentTable()
Expand Down
4 changes: 2 additions & 2 deletions Tests/Session/Storage/NativeSessionStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ public function testDefaultSessionCacheLimiter()
{
$this->iniSet('session.cache_limiter', 'nocache');

$storage = new NativeSessionStorage();
new NativeSessionStorage();
$this->assertEquals('', ini_get('session.cache_limiter'));
}

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

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

Expand Down

0 comments on commit 7b4626a

Please sign in to comment.