Skip to content

Conversation

@paulbalandan
Copy link
Member

Description
For contributors, when running EncryptionTest and there is a .env file in the root, tests will fail because of a set encryption key.

There were 2 failures:

1) CodeIgniter\Encryption\EncryptionTest::testConstructor
Failed asserting that a string is empty.

/Users/paul/Workspace/CodeIgniter4/tests/system/Encryption/EncryptionTest.php:61

2) CodeIgniter\Encryption\EncryptionTest::testServiceWithoutKey
Failed asserting that exception of type "CodeIgniter\Encryption\Exceptions\EncryptionException" is thrown.

This PR will backup the .env and unset any environment variables already set by the file.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan added the testing Pull requests that changes tests only label Dec 30, 2023
@paulbalandan paulbalandan merged commit 5f655f1 into codeigniter4:develop Jan 2, 2024
@paulbalandan paulbalandan deleted the encryption-test-with-env branch January 2, 2024 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants