Skip to content

Commit ac5ee4f

Browse files
committed
remove code that is in 8.x
1 parent d7207f5 commit ac5ee4f

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

src/Illuminate/Mail/MailManager.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -440,25 +440,6 @@ public function setDefaultDriver(string $name)
440440
$this->app['config']['mail.default'] = $name;
441441
}
442442

443-
/**
444-
* Forget a mailer instance by name.
445-
*
446-
* @param array|string|null $name
447-
* @return void
448-
*/
449-
public function forgetMailer($name = null)
450-
{
451-
$name = $name ?? $this->getDefaultDriver();
452-
453-
foreach ((array) $name as $mailerName) {
454-
if (isset($this->mailers[$mailerName])) {
455-
unset($this->mailers[$mailerName]);
456-
}
457-
}
458-
459-
return $this;
460-
}
461-
462443
/**
463444
* Register a custom transport creator Closure.
464445
*

tests/Mail/MailManagerTest.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,4 @@ public function emptyTransportConfigDataProvider()
3333
[null], [''], [' '],
3434
];
3535
}
36-
37-
public function testForgetMailer()
38-
{
39-
$this->app['config']->set('mail.mailers.custom_smtp', [
40-
'transport' => 'smtp',
41-
'host' => 'example.com',
42-
'port' => '25',
43-
'encryption' => 'tls',
44-
'username' => 'username',
45-
'password' => 'password',
46-
'timeout' => 10,
47-
]);
48-
49-
/** @var MailManager $mailManager */
50-
$mailManager = $this->app['mail.manager'];
51-
$mailManager->mailer('custom_smtp');
52-
53-
$mailersProperty = new \ReflectionProperty($mailManager, 'mailers');
54-
$mailersProperty->setAccessible(true);
55-
56-
$this->assertArrayHasKey('custom_smtp', $mailersProperty->getValue($mailManager), 'Mailer must exist in the $mailers-property');
57-
58-
$mailManager->forgetMailer('custom_smtp');
59-
60-
$this->assertArrayNotHasKey('custom_smtp', $mailersProperty->getValue($mailManager), 'Mailer must not exist in the $mailers-property as it must have been removed with MailManager::forgetMailer()');
61-
}
6236
}

0 commit comments

Comments
 (0)