Skip to content

Commit 881cd5b

Browse files
Merge branch '5.2' into 5.3
* 5.2: [gha] Define COLUMNS properly [travis] keep compiling sodium
2 parents 0746741 + ca95fa9 commit 881cd5b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Tests/Functional/UserPasswordEncoderCommandTest.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
3131
{
3232
/** @var CommandTester */
3333
private $passwordEncoderCommandTester;
34+
private $colSize;
35+
36+
protected function setUp(): void
37+
{
38+
$this->colSize = getenv('COLUMNS');
39+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
40+
}
41+
42+
protected function tearDown(): void
43+
{
44+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
45+
}
3446

3547
public function testEncodePasswordEmptySalt()
3648
{
@@ -316,7 +328,6 @@ public function testThrowsExceptionOnNoConfiguredEncoders()
316328

317329
protected function setUp(): void
318330
{
319-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
320331
$kernel = $this->createKernel(['test_case' => 'PasswordEncode']);
321332
$kernel->boot();
322333

@@ -334,7 +345,6 @@ protected function tearDown(): void
334345

335346
private function setupArgon2i()
336347
{
337-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
338348
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'argon2i.yml']);
339349
$kernel->boot();
340350

@@ -347,7 +357,6 @@ private function setupArgon2i()
347357

348358
private function setupArgon2id()
349359
{
350-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
351360
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'argon2id.yml']);
352361
$kernel->boot();
353362

@@ -360,7 +369,6 @@ private function setupArgon2id()
360369

361370
private function setupBcrypt()
362371
{
363-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
364372
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'bcrypt.yml']);
365373
$kernel->boot();
366374

@@ -373,7 +381,6 @@ private function setupBcrypt()
373381

374382
private function setupSodium()
375383
{
376-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
377384
$kernel = $this->createKernel(['test_case' => 'PasswordEncode', 'root_config' => 'sodium.yml']);
378385
$kernel->boot();
379386

0 commit comments

Comments
 (0)