remove usage of getenv from codebase (#1861)
This commit is contained in:
@@ -19,15 +19,13 @@ class MailConfigurationTest extends TestCase
|
||||
{
|
||||
public function testGetFromAddress()
|
||||
{
|
||||
$previous = getenv('MAILER_FROM');
|
||||
putenv('MAILER_FROM=foo-bar123@example.com');
|
||||
|
||||
$sut = new MailConfiguration();
|
||||
$sut = new MailConfiguration('foo-bar123@example.com');
|
||||
self::assertEquals('foo-bar123@example.com', $sut->getFromAddress());
|
||||
}
|
||||
|
||||
putenv('MAILER_FROM=');
|
||||
public function testGetFromAddressWithEmptyAddressReturnsNull()
|
||||
{
|
||||
$sut = new MailConfiguration('');
|
||||
self::assertNull($sut->getFromAddress());
|
||||
|
||||
putenv('MAILER_FROM=' . $previous);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user