summaryrefslogtreecommitdiff
path: root/test/HTTP_POST_multipartTest.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-05-09 15:42:17 +0000
committeruckelman <uckelman@nomic.net>2010-05-09 15:42:17 +0000
commit9e545c4d98b6a20bcaa762b70a2a9af46ade5944 (patch)
tree39e263be3192e28bb9407fd2562315d28a3bb7ff /test/HTTP_POST_multipartTest.php
parent41507db4763193add8ad711190657e40a805effc (diff)
Adjustments to test.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6815 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test/HTTP_POST_multipartTest.php')
-rw-r--r--test/HTTP_POST_multipartTest.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/HTTP_POST_multipartTest.php b/test/HTTP_POST_multipartTest.php
index c15f252..0abb282 100644
--- a/test/HTTP_POST_multipartTest.php
+++ b/test/HTTP_POST_multipartTest.php
@@ -5,24 +5,19 @@ require_once('src/HTTP_POST_multipart.php');
class HTTP_POST_multipartTest extends PHPUnit_Framework_TestCase {
- protected static $_class;
-
- public static function setUpBeforeClass() {
- # Set all methods to be public so we can test them
- self::$_class = new ReflectionClass('HTTP_POST_multipart');
- foreach (self::$_class->getMethods() as $method) {
- $method->setAccessible(true);
- }
- }
-
/**
* @dataProvider providerBuildDataPart
*/
public function testBuildDataPart($name, $data, $expected, $ex) {
if ($ex) $this->setExpectedException($ex);
+
+ $class = new ReflectionClass('HTTP_POST_multipart');
+ $method = $class->getMethod('bulidDataPart');
+ $method->setAccessible(true);
+
$this->assertEquals(
$expected,
- self::$_class->getMethod('bulidDataPart', array($name, $data))
+ $method->invokeArgs(null, array($name, $data))
);
}