| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function testShortcodesAreRenderedInEmailPreviewContent() |
||
| 14 | { |
||
| 15 | $page = $this->objFromFixture(SiteTree::class, 'about_us'); |
||
| 16 | |||
| 17 | $recipient = EmailRecipient::create(); |
||
| 18 | $recipient->SendPlain = false; |
||
|
|
|||
| 19 | $recipient->EmailBodyHtml = '<p>Some email content. About us: [sitetree_link,id=' . $page->ID . '].</p>'; |
||
| 20 | |||
| 21 | $result = $recipient->getEmailBodyContent(); |
||
| 22 | $this->assertContains('/about-us/', $result); |
||
| 23 | |||
| 24 | $recipient->SendPlain = true; |
||
| 25 | $recipient->EmailBody = 'Some email content. About us: [sitetree_link,id=' . $page->ID . '].'; |
||
| 26 | |||
| 27 | $result = $recipient->getEmailBodyContent(); |
||
| 28 | $this->assertContains('/about-us/', $result); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.