From 946b326a1b3aa6f1f01161c4c385a3efb1d24d0a Mon Sep 17 00:00:00 2001 From: uckelman Date: Sat, 20 Mar 2010 14:02:07 +0000 Subject: 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 --- test/EmailMessageTest.php | 12 ++++++------ 1 file 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()); } -- cgit v1.2.3