From: Mark A. Hershberger Date: Tue, 30 Mar 2010 17:03:07 +0000 (+0000) Subject: whitespace removal X-Git-Tag: 1.31.0-rc.0~37305 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=ffb1839397ea436b71d7f0f607777e954a7cc122;p=lhc%2Fweb%2Fwiklou.git whitespace removal --- diff --git a/maintenance/tests/UploadTest.php b/maintenance/tests/UploadTest.php index 952924a7c6..a4b3acaafa 100644 --- a/maintenance/tests/UploadTest.php +++ b/maintenance/tests/UploadTest.php @@ -4,47 +4,47 @@ */ class UploadTest extends PHPUnit_Framework_TestCase { protected $upload; - + function setUp() { parent::setup(); - $this->upload = new UploadTestHandler; + $this->upload = new UploadTestHandler; } - + /** * Test various forms of valid and invalid titles that can be supplied. */ public function testTitleValidation() { - + /* Test a valid title */ - $this->assertUploadTitleAndCode( 'ValidTitle.jpg', + $this->assertUploadTitleAndCode( 'ValidTitle.jpg', 'ValidTitle.jpg', UploadTestHandler::OK, 'upload valid title' ); - + /* A title with a slash */ $this->assertUploadTitleAndCode( 'A/B.jpg', 'B.jpg', UploadTestHandler::OK, 'upload title with slash' ); - + /* A title with illegal char */ $this->assertUploadTitleAndCode( 'A:B.jpg', 'A-B.jpg', UploadTestHandler::OK, 'upload title with colon' ); - + /* A title without extension */ $this->assertUploadTitleAndCode( 'A', null, UploadTestHandler::FILETYPE_MISSING, 'upload title without extension' ); - + /* A title with no basename */ $this->assertUploadTitleAndCode( '.jpg', null, UploadTestHandler::MIN_LENGTH_PARTNAME, 'upload title without basename' ); - + } /** - * Helper function for testTitleValidation. First checks the return code + * Helper function for testTitleValidation. First checks the return code * of UploadBase::getTitle() and then the actual returned titl */ private function assertUploadTitleAndCode( $srcFilename, $dstFilename, $code, $msg ) { @@ -52,7 +52,7 @@ class UploadTest extends PHPUnit_Framework_TestCase { $this->assertEquals( $code, $this->upload->testTitleValidation( $srcFilename ), "$msg code" ); - + /* If we expect a valid title, check the title itself. */ if ( $code == UploadTestHandler::OK ) { $this->assertEquals( $dstFilename, @@ -60,7 +60,7 @@ class UploadTest extends PHPUnit_Framework_TestCase { "$msg text" ); } } - + /** * Test the upload verification functions */ @@ -69,7 +69,7 @@ class UploadTest extends PHPUnit_Framework_TestCase { $this->upload->initializePathInfo( '', '', 0 ); $result = $this->upload->verifyUpload(); $this->assertEquals( UploadTestHandler::EMPTY_FILE, - $result['status'], + $result['status'], 'upload empty file' ); }