summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-05-09 15:50:55 +0000
committeruckelman <uckelman@nomic.net>2010-05-09 15:50:55 +0000
commit36439693db5a5220cf18bf9b9ad8cc83db17b59e (patch)
treeb4ee456b2b3bea361354c945af60b9b3c48736b1
parenta4a0f6a6a7ca6f08b1f6f3a6da8f5083bd248dad (diff)
Refactored.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6817 67b53d14-2c14-4ace-a08f-0dab2b34000c
-rw-r--r--test/HTTP_POST_multipartTest.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/HTTP_POST_multipartTest.php b/test/HTTP_POST_multipartTest.php
index b2f675b..a6dcae0 100644
--- a/test/HTTP_POST_multipartTest.php
+++ b/test/HTTP_POST_multipartTest.php
@@ -5,19 +5,22 @@ require_once('src/HTTP_POST_multipart.php');
class HTTP_POST_multipartTest extends PHPUnit_Framework_TestCase {
+ protected static function getMethod($name) {
+ $class = new ReflectionClass('HTTP_POST_multipart');
+ $method = $class->getMethod($name);
+ $method->setAccessible(true);
+ return $method;
+ }
+
/**
* @dataProvider providerBuildDataPart
*/
public function testBuildDataPart($name, $data, $expected, $ex) {
if ($ex) $this->setExpectedException($ex);
- $class = new ReflectionClass('HTTP_POST_multipart');
- $method = $class->getMethod('buildDataPart');
- $method->setAccessible(true);
-
$this->assertEquals(
$expected,
- $method->invokeArgs(null, array($name, $data))
+ self::getMethod('buildDataPart')->invokeArgs(null, array($name, $data))
);
}
@@ -28,6 +31,7 @@ class HTTP_POST_multipartTest extends PHPUnit_Framework_TestCase {
);
}
+
}
?>