diff options
author | uckelman <uckelman@nomic.net> | 2010-05-09 15:50:55 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-05-09 15:50:55 +0000 |
commit | 36439693db5a5220cf18bf9b9ad8cc83db17b59e (patch) | |
tree | b4ee456b2b3bea361354c945af60b9b3c48736b1 /test | |
parent | a4a0f6a6a7ca6f08b1f6f3a6da8f5083bd248dad (diff) |
Refactored.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6817 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test')
-rw-r--r-- | test/HTTP_POST_multipartTest.php | 14 |
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 { ); } + } ?> |