summaryrefslogtreecommitdiff
path: root/test/EmailMessageTest.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-03-20 14:02:07 +0000
committeruckelman <uckelman@nomic.net>2010-03-20 14:02:07 +0000
commit946b326a1b3aa6f1f01161c4c385a3efb1d24d0a (patch)
tree26bf04969b96e732de074cd5da4da205fbbd9286 /test/EmailMessageTest.php
parent8cba263bbcc182839695c068abf145195a07bffc (diff)
Move file read out of tests.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6620 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test/EmailMessageTest.php')
-rw-r--r--test/EmailMessageTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/EmailMessageTest.php b/test/EmailMessageTest.php
index ffbd666..c3269f5 100644
--- a/test/EmailMessageTest.php
+++ b/test/EmailMessageTest.php
@@ -9,7 +9,7 @@ class EmailMessageTest extends PHPUnit_Framework_TestCase {
public function provider() {
return array(
array(array(
- 'file' => __DIR__ . '/1',
+ 'file' => file_get_contents(__DIR__ . '/1'),
'source' => '',
'post_id' => '',
'from' => 'uckelman@nomic.net',
@@ -40,7 +40,7 @@ class EmailMessageTest extends PHPUnit_Framework_TestCase {
* @dataProvider provider
*/
public function testGetFrom($expected) {
- $msg = new EmailMessage(file_get_contents($expected['file']));
+ $msg = new EmailMessage($expected['file']);
$this->assertEquals($expected['from'], $msg->getFrom());
}
@@ -48,7 +48,7 @@ class EmailMessageTest extends PHPUnit_Framework_TestCase {
* @dataProvider provider
*/
public function testGetSubject($expected) {
- $msg = new EmailMessage(file_get_contents($expected['file']));
+ $msg = new EmailMessage($expected['file']);
$this->assertEquals($expected['subject'], $msg->getSubject());
}
@@ -56,7 +56,7 @@ class EmailMessageTest extends PHPUnit_Framework_TestCase {
* @dataProvider provider
*/
public function testGetMessageId($expected) {
- $msg = new EmailMessage(file_get_contents($expected['file']));
+ $msg = new EmailMessage($expected['file']);
$this->assertEquals($expected['message_id'], $msg->getMessageId());
}
@@ -64,7 +64,7 @@ class EmailMessageTest extends PHPUnit_Framework_TestCase {
* @dataProvider provider
*/
public function testGetInReplyTo($expected) {
- $msg = new EmailMessage(file_get_contents($expected['file']));
+ $msg = new EmailMessage($expected['file']);
$this->assertEquals($expected['in_reply_to'], $msg->getInReplyTo());
}
@@ -72,7 +72,7 @@ class EmailMessageTest extends PHPUnit_Framework_TestCase {
* @dataProvider provider
*/
public function testGetReferences($expected) {
- $msg = new EmailMessage(file_get_contents($expected['file']));
+ $msg = new EmailMessage($expected['file']);
$this->assertEquals($expected['references'], $msg->getReferences());
}