mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Add void return to method in tests. (#20602)
This commit is contained in:
		@ -13,7 +13,7 @@ use yiiunit\TestCase;
 | 
			
		||||
 | 
			
		||||
class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testParse()
 | 
			
		||||
    public function testParse(): void
 | 
			
		||||
    {
 | 
			
		||||
        if (defined('HHVM_VERSION')) {
 | 
			
		||||
            static::markTestSkipped('Can not test on HHVM because it does not support proper handling of the temporary files.');
 | 
			
		||||
@ -53,7 +53,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
        $this->assertStringEqualsFile($_FILES['Item']['tmp_name']['file'], 'item file content');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testParseWithDoubleQuotes()
 | 
			
		||||
    public function testParseWithDoubleQuotes(): void
 | 
			
		||||
    {
 | 
			
		||||
        if (defined('HHVM_VERSION')) {
 | 
			
		||||
            static::markTestSkipped('Can not test on HHVM because it does not support proper handling of the temporary files.');
 | 
			
		||||
@ -96,7 +96,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
    /**
 | 
			
		||||
     * @depends testParse
 | 
			
		||||
     */
 | 
			
		||||
    public function testNotEmptyPost()
 | 
			
		||||
    public function testNotEmptyPost(): void
 | 
			
		||||
    {
 | 
			
		||||
        $parser = new MultipartFormDataParser();
 | 
			
		||||
 | 
			
		||||
@ -112,7 +112,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
    /**
 | 
			
		||||
     * @depends testParse
 | 
			
		||||
     */
 | 
			
		||||
    public function testNotEmptyFiles()
 | 
			
		||||
    public function testNotEmptyFiles(): void
 | 
			
		||||
    {
 | 
			
		||||
        $parser = new MultipartFormDataParser();
 | 
			
		||||
 | 
			
		||||
@ -134,7 +134,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
    /**
 | 
			
		||||
     * @depends testParse
 | 
			
		||||
     */
 | 
			
		||||
    public function testUploadFileMaxCount()
 | 
			
		||||
    public function testUploadFileMaxCount(): void
 | 
			
		||||
    {
 | 
			
		||||
        $parser = new MultipartFormDataParser();
 | 
			
		||||
        $parser->setUploadFileMaxCount(2);
 | 
			
		||||
@ -153,7 +153,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
    /**
 | 
			
		||||
     * @depends testParse
 | 
			
		||||
     */
 | 
			
		||||
    public function testUploadFileMaxSize()
 | 
			
		||||
    public function testUploadFileMaxSize(): void
 | 
			
		||||
    {
 | 
			
		||||
        $parser = new MultipartFormDataParser();
 | 
			
		||||
        $parser->setUploadFileMaxSize(20);
 | 
			
		||||
@ -170,7 +170,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
        $this->assertEquals(UPLOAD_ERR_INI_SIZE, $_FILES['thirdFile']['error']);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testUploadFileAsArray()
 | 
			
		||||
    public function testUploadFileAsArray(): void
 | 
			
		||||
    {
 | 
			
		||||
        $parser = new MultipartFormDataParser();
 | 
			
		||||
 | 
			
		||||
@ -192,7 +192,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
     * @depends testNotEmptyPost
 | 
			
		||||
     * @depends testNotEmptyFiles
 | 
			
		||||
     */
 | 
			
		||||
    public function testForce()
 | 
			
		||||
    public function testForce(): void
 | 
			
		||||
    {
 | 
			
		||||
        $parser = new MultipartFormDataParser();
 | 
			
		||||
        $parser->force = true;
 | 
			
		||||
@ -223,7 +223,7 @@ class MultipartFormDataParserTest extends TestCase
 | 
			
		||||
        $this->assertFalse(isset($_FILES['existingFile']));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testParseUnicodeInFileName()
 | 
			
		||||
    public function testParseUnicodeInFileName(): void
 | 
			
		||||
    {
 | 
			
		||||
        $unicodeName = 'х.jpg'; // this is Russian "х"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user