示例#1
0
 /**
  * Prepare the newsletter content for the specified email (substitute markers and insert spies)
  * @param Tx_Newsletter_Domain_Model_Email $email
  * @param boolean $isPreview whether we are preparing a preview version of the newsletter
  */
 public function prepare(Tx_Newsletter_Domain_Model_Email $email, $isPreview = false)
 {
     $this->resetMarkers();
     if ($this->newsletter->getInjectOpenSpy()) {
         $this->injectOpenSpy($email);
     }
     if ($this->newsletter->getInjectLinksSpy()) {
         $this->injectLinksSpy($email, $isPreview);
     }
     // We substitute markers last because we don't want to spy each links to view/unsubscribe
     // (created via markers) for each recipient. Only the generic marker is enough.
     // Otherwise we would mess up opened link statistics
     $this->substituteMarkers($email);
 }
 /**
  * @test
  */
 public function setInjectLinksSpyForBooleanSetsInjectLinksSpy()
 {
     $this->fixture->setInjectLinksSpy(TRUE);
     $this->assertSame(TRUE, $this->fixture->getInjectLinksSpy());
 }