Esempio n. 1
0
 public function testDeliver()
 {
     $n = new Notifier();
     $result = $n->deliverConfirm(User::find(1));
     $this->assertTrue($result);
     // headers
     $this->assertContains('Date:', $n->getHeaders());
     $this->assertContains('From: test@example.com', $n->getHeaders());
     $this->assertContains('Cc: test1@example.com', $n->getHeaders());
     $this->assertContains('Mime-Version: 1.0', $n->getHeaders());
     $this->assertNotContains('Bcc:', $n->getHeaders());
     // body
     $this->assertContains('Content-Type: text/plain; charset="utf-8"', $n->getBody());
     $this->assertContains('Dear Mike,', $n->getBody());
     $this->assertContains('http://maintainable.com', $n->getBody());
 }