-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
65 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ sudo: false | |
|
||
language: php | ||
|
||
dist: precise | ||
|
||
matrix: | ||
include: | ||
- php: 5.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/model/recipients/UserDefinedForm_EmailRecipientTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
class UserDefinedForm_EmailRecipientTest extends SapphireTest | ||
{ | ||
protected static $fixture_file = 'UserDefinedForm_EmailRecipientTest.yml'; | ||
|
||
public function testShortcodesAreRenderedInEmailPreviewContent() | ||
{ | ||
$page = $this->objFromFixture('SiteTree', 'about_us'); | ||
|
||
$recipient = UserDefinedForm_EmailRecipient::create(); | ||
$recipient->SendPlain = false; | ||
$recipient->EmailBodyHtml = '<p>Some email content. About us: [sitetree_link,id=' . $page->ID . '].</p>'; | ||
|
||
$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); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/model/recipients/UserDefinedForm_EmailRecipientTest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SiteTree: | ||
about_us: | ||
Title: About Us | ||
URLSegment: about-us |