objFromFixture('SiteTree', 'about_us'); $recipient = UserDefinedForm_EmailRecipient::create(); $recipient->SendPlain = false; $recipient->EmailBodyHtml = '
Some email content. About us: [sitetree_link,id=' . $page->ID . '].
'; $result = $recipient->getEmailBodyContent(); $this->assertContains('/about-us/', $result); $recipient->SendPlain = true; $recipient->EmailBody = 'Some email content. About us: [sitetree_link,id=' . $page->ID . '].'; $result = $recipient->getEmailBodyContent(); $this->assertContains('/about-us/', $result); } }