@@ -31,6 +31,18 @@ class UserPasswordEncoderCommandTest extends AbstractWebTestCase
31
31
{
32
32
/** @var CommandTester */
33
33
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
+ }
34
46
35
47
public function testEncodePasswordEmptySalt ()
36
48
{
@@ -316,7 +328,6 @@ public function testThrowsExceptionOnNoConfiguredEncoders()
316
328
317
329
protected function setUp (): void
318
330
{
319
- putenv ('COLUMNS= ' .(119 + \strlen (\PHP_EOL )));
320
331
$ kernel = $ this ->createKernel (['test_case ' => 'PasswordEncode ' ]);
321
332
$ kernel ->boot ();
322
333
@@ -334,7 +345,6 @@ protected function tearDown(): void
334
345
335
346
private function setupArgon2i ()
336
347
{
337
- putenv ('COLUMNS= ' .(119 + \strlen (\PHP_EOL )));
338
348
$ kernel = $ this ->createKernel (['test_case ' => 'PasswordEncode ' , 'root_config ' => 'argon2i.yml ' ]);
339
349
$ kernel ->boot ();
340
350
@@ -347,7 +357,6 @@ private function setupArgon2i()
347
357
348
358
private function setupArgon2id ()
349
359
{
350
- putenv ('COLUMNS= ' .(119 + \strlen (\PHP_EOL )));
351
360
$ kernel = $ this ->createKernel (['test_case ' => 'PasswordEncode ' , 'root_config ' => 'argon2id.yml ' ]);
352
361
$ kernel ->boot ();
353
362
@@ -360,7 +369,6 @@ private function setupArgon2id()
360
369
361
370
private function setupBcrypt ()
362
371
{
363
- putenv ('COLUMNS= ' .(119 + \strlen (\PHP_EOL )));
364
372
$ kernel = $ this ->createKernel (['test_case ' => 'PasswordEncode ' , 'root_config ' => 'bcrypt.yml ' ]);
365
373
$ kernel ->boot ();
366
374
@@ -373,7 +381,6 @@ private function setupBcrypt()
373
381
374
382
private function setupSodium ()
375
383
{
376
- putenv ('COLUMNS= ' .(119 + \strlen (\PHP_EOL )));
377
384
$ kernel = $ this ->createKernel (['test_case ' => 'PasswordEncode ' , 'root_config ' => 'sodium.yml ' ]);
378
385
$ kernel ->boot ();
379
386
0 commit comments