本文整理汇总了PHP中Notifier::getRecipients方法的典型用法代码示例。如果您正苦于以下问题:PHP Notifier::getRecipients方法的具体用法?PHP Notifier::getRecipients怎么用?PHP Notifier::getRecipients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notifier
的用法示例。
在下文中一共展示了Notifier::getRecipients方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSendWithAttachments
public function testSendWithAttachments()
{
$n = new Notifier();
$result = $n->createSendWithAttachments();
$attachments = $n->getAttachments();
$attachment = current($attachments);
$this->assertEquals('text/plain', $attachment['contentType']);
$this->assertEquals('the attachment', $attachment['body']);
$this->assertEquals('check_it_out.txt', $attachment['filename']);
$this->assertEquals('base64', $attachment['transferEncoding']);
// result has both headers/body
$this->assertContains('Dear Derek,', $result);
$this->assertEquals('derek@maintainable.com', $n->getRecipients());
$this->assertEquals('Confirmation for test', $n->getSubject());
// headers
$this->assertContains('Date:', $n->getHeaders());
$this->assertContains('From: test@example.com', $n->getHeaders());
$this->assertContains('Mime-Version: 1.0', $n->getHeaders());
// body
$this->assertContains('Content-Type: text/plain; charset="utf-8"', $n->getBody());
$this->assertContains('Dear Derek,', $n->getBody());
$this->assertContains('The Maintainable Team', $n->getBody());
// attachments
$this->assertContains('Content-Transfer-Encoding: base64', $n->getBody());
$this->assertContains('Content-Disposition: attachment; filename="check_it_out.txt"', $n->getBody());
}