Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function testShortcodesAreRenderedInEmailPreviewContent() |
||
8 | { |
||
9 | $page = $this->objFromFixture('SiteTree', 'about_us'); |
||
10 | |||
11 | $recipient = UserDefinedForm_EmailRecipient::create(); |
||
12 | $recipient->SendPlain = false; |
||
13 | $recipient->EmailBodyHtml = '<p>Some email content. About us: [sitetree_link,id=' . $page->ID . '].</p>'; |
||
14 | |||
15 | $result = $recipient->getEmailBodyContent(); |
||
16 | $this->assertContains('/about-us/', $result); |
||
17 | |||
18 | $recipient->SendPlain = true; |
||
19 | $recipient->EmailBody = 'Some email content. About us: [sitetree_link,id=' . $page->ID . '].'; |
||
20 | |||
21 | $result = $recipient->getEmailBodyContent(); |
||
22 | $this->assertContains('/about-us/', $result); |
||
23 | } |
||
24 | } |
||
25 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.