Skip to content

Commit 826f0ed

Browse files
committed
Update tests
1 parent 259e0dc commit 826f0ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/Integration/Console/EnvironmentDecryptCommandTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testItGeneratesTheEnvironmentFileWithGeneratedKey()
7979
->shouldReceive('get')
8080
->once()
8181
->andReturn(
82-
(new Encrypter($key = Encrypter::generateKey('aes-128-cbc'), 'aes-128-cbc'))
82+
(new Encrypter($key = Encrypter::generateKey('AES-256-CBC'), 'AES-256-CBC'))
8383
->encrypt('APP_NAME=Laravel')
8484
);
8585

@@ -116,7 +116,7 @@ public function testItGeneratesTheEnvironmentFileWithUserProvidedKey()
116116

117117
public function testItGeneratesTheEnvironmentFileWithKeyFromEnvironment()
118118
{
119-
putenv('LARAVEL_ENV_ENCRYPTION_KEY=ponmlkjihgfedcba');
119+
putenv('LARAVEL_ENV_ENCRYPTION_KEY=ponmlkjihgfedcbaponmlkjihgfedcba');
120120

121121
$this->filesystem->shouldReceive('exists')
122122
->once()
@@ -127,7 +127,7 @@ public function testItGeneratesTheEnvironmentFileWithKeyFromEnvironment()
127127
->shouldReceive('get')
128128
->once()
129129
->andReturn(
130-
(new Encrypter('ponmlkjihgfedcba', 'aes-128-cbc'))
130+
(new Encrypter('ponmlkjihgfedcbaponmlkjihgfedcba', 'AES-256-CBC'))
131131
->encrypt('APP_NAME="Laravel Three"')
132132
);
133133

@@ -214,11 +214,11 @@ public function testItWritesTheEnvironmentFileCustomFilename()
214214
->shouldReceive('get')
215215
->once()
216216
->andReturn(
217-
(new Encrypter('abcdefghijklmnop'))
217+
(new Encrypter('abcdefghijklmnopabcdefghijklmnop', 'AES-256-CBC'))
218218
->encrypt('APP_NAME="Laravel Two"')
219219
);
220220

221-
$this->artisan('env:decrypt', ['--env' => 'production', '--key' => 'abcdefghijklmnop', '--filename' => '.env'])
221+
$this->artisan('env:decrypt', ['--env' => 'production', '--key' => 'abcdefghijklmnopabcdefghijklmnop', '--filename' => '.env'])
222222
->expectsOutputToContain('Environment successfully decrypted.')
223223
->assertExitCode(0);
224224

0 commit comments

Comments
 (0)