Differential D17329 Diff 41677 src/applications/metamta/storage/__tests__/PhabricatorMetaMTAMailTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/storage/__tests__/PhabricatorMetaMTAMailTestCase.php
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | public function testRecipients() { | ||||
$user = $this->writeSetting( | $user = $this->writeSetting( | ||||
$user, | $user, | ||||
PhabricatorEmailTagsSetting::SETTINGKEY, | PhabricatorEmailTagsSetting::SETTINGKEY, | ||||
null); | null); | ||||
$this->assertTrue( | $this->assertTrue( | ||||
in_array($phid, $mail->buildRecipientList()), | in_array($phid, $mail->buildRecipientList()), | ||||
'Recipients restored after tag preference removed.'); | 'Recipients restored after tag preference removed.'); | ||||
$email = id(new PhabricatorUserEmail())->loadOneWhere( | |||||
'userPHID = %s AND isPrimary = 1', | |||||
$phid); | |||||
$email->setIsVerified(0)->save(); | |||||
$this->assertFalse( | |||||
in_array($phid, $mail->buildRecipientList()), | |||||
pht('Mail not sent to unverified address.')); | |||||
$email->setIsVerified(1)->save(); | |||||
$this->assertTrue( | |||||
in_array($phid, $mail->buildRecipientList()), | |||||
pht('Mail sent to verified address.')); | |||||
} | } | ||||
public function testThreadIDHeaders() { | public function testThreadIDHeaders() { | ||||
$this->runThreadIDHeadersWithConfiguration(true, true); | $this->runThreadIDHeadersWithConfiguration(true, true); | ||||
$this->runThreadIDHeadersWithConfiguration(true, false); | $this->runThreadIDHeadersWithConfiguration(true, false); | ||||
$this->runThreadIDHeadersWithConfiguration(false, true); | $this->runThreadIDHeadersWithConfiguration(false, true); | ||||
$this->runThreadIDHeadersWithConfiguration(false, false); | $this->runThreadIDHeadersWithConfiguration(false, false); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |