-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #445 from heiglandreas/updateToPHPUnit6+
Adapt tests to work with PHPUnit > 5
- Loading branch information
Showing
18 changed files
with
55 additions
and
22 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,12 @@ | |
namespace JoindinTest\Inc; | ||
|
||
use TalkModel; | ||
use TalkCommentEmailService; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
require_once __DIR__.'/../../src/services/TalkCommentEmailService.php'; | ||
|
||
class TalkCommentEmailServiceTest extends \PHPUnit_Framework_Testcase | ||
class TalkCommentEmailServiceTest extends Testcase | ||
{ | ||
|
||
protected $config = [ | ||
|
@@ -33,7 +35,7 @@ public function createService() | |
$talk = new TalkModel(["talk_title" => "sample talk"]); | ||
$comment = ["comments" => [["comment" => "test comment", "rating" => 3]]]; | ||
|
||
$service = new \TalkCommentEmailService($this->config, $recipients, $talk, $comment); | ||
$service = new TalkCommentEmailService($this->config, $recipients, $talk, $comment); | ||
$this->assertInstanceOf('TalkCommentEmailService', $service); | ||
} | ||
|
||
|
@@ -50,7 +52,7 @@ public function createServiceWithEmailRedirect() | |
$talk = new TalkModel(["talk_title" => "sample talk"]); | ||
$comment = ["comments" => [["comment" => "test comment", "rating" => 3]]]; | ||
|
||
$service = new \TalkCommentEmailService($config, $recipients, $talk, $comment); | ||
$service = new TalkCommentEmailService($config, $recipients, $talk, $comment); | ||
$this->assertEquals(["[email protected]"], $service->getRecipients()); | ||
} | ||
|
||
|
@@ -65,7 +67,7 @@ public function templateReplacements() | |
$talk = new TalkModel(["talk_title" => "sample talk"]); | ||
$comment = ["comments" => [["comment" => "test comment", "rating" => 3]]]; | ||
|
||
$service = new \TalkCommentEmailService($this->config, $recipients, $talk, $comment); | ||
$service = new TalkCommentEmailService($this->config, $recipients, $talk, $comment); | ||
$service->templatePath = __DIR__.'/../../src/views/emails/'; | ||
|
||
$template = "testTemplate.md"; | ||
|
@@ -94,7 +96,7 @@ public function markdownTransform() | |
$talk = new TalkModel(["talk_title" => "sample talk"]); | ||
$comment = ["comments" => [["comment" => "test comment", "rating" => 3]]]; | ||
|
||
$service = new \TalkCommentEmailService($this->config, $recipients, $talk, $comment); | ||
$service = new TalkCommentEmailService($this->config, $recipients, $talk, $comment); | ||
|
||
$html = $service->markdownToHtml($markdown); | ||
$this->assertEquals( | ||
|
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
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