Skip to content

Commit b921872

Browse files
Merge branch '5.3' into 5.4
* 5.3: -
2 parents edff463 + eacf514 commit b921872

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Tests/Command/UserPasswordHashCommandTest.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@ class UserPasswordHashCommandTest extends TestCase
2727
private $passwordHasherCommandTester;
2828
private $colSize;
2929

30-
protected function setUp(): void
31-
{
32-
$this->colSize = getenv('COLUMNS');
33-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
34-
}
35-
36-
protected function tearDown(): void
37-
{
38-
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
39-
}
40-
4130
public function testEncodePasswordEmptySalt()
4231
{
4332
$this->passwordHasherCommandTester->execute([
@@ -299,6 +288,9 @@ public function testThrowsExceptionOnNoConfiguredHashers()
299288

300289
protected function setUp(): void
301290
{
291+
$this->colSize = getenv('COLUMNS');
292+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
293+
302294
$hasherFactory = new PasswordHasherFactory([
303295
InMemoryUser::class => ['algorithm' => 'plaintext'],
304296
'Custom\Class\Native\User' => ['algorithm' => 'native', 'cost' => 10],
@@ -315,6 +307,7 @@ protected function setUp(): void
315307
protected function tearDown(): void
316308
{
317309
$this->passwordHasherCommandTester = null;
310+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
318311
}
319312

320313
private function setupArgon2i()

0 commit comments

Comments
 (0)