mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-12 10:18:27 +01:00
Used more specific unit test assertions in framework tests
This commit is contained in:
committed by
GitHub
parent
6397791513
commit
3f8e8a89eb
@@ -33,18 +33,18 @@ class MultipartFormDataParserTest extends TestCase
|
||||
];
|
||||
$this->assertEquals($expectedBodyParams, $bodyParams);
|
||||
|
||||
$this->assertFalse(empty($_FILES['someFile']));
|
||||
$this->assertNotEmpty($_FILES['someFile']);
|
||||
$this->assertEquals(UPLOAD_ERR_OK, $_FILES['someFile']['error']);
|
||||
$this->assertEquals('some-file.txt', $_FILES['someFile']['name']);
|
||||
$this->assertEquals('text/plain', $_FILES['someFile']['type']);
|
||||
$this->assertEquals('some file content', file_get_contents($_FILES['someFile']['tmp_name']));
|
||||
$this->assertStringEqualsFile($_FILES['someFile']['tmp_name'], 'some file content');
|
||||
|
||||
$this->assertFalse(empty($_FILES['Item']));
|
||||
$this->assertFalse(empty($_FILES['Item']['name']['file']));
|
||||
$this->assertNotEmpty($_FILES['Item']);
|
||||
$this->assertNotEmpty($_FILES['Item']['name']['file']);
|
||||
$this->assertEquals(UPLOAD_ERR_OK, $_FILES['Item']['error']['file']);
|
||||
$this->assertEquals('item-file.txt', $_FILES['Item']['name']['file']);
|
||||
$this->assertEquals('text/plain', $_FILES['Item']['type']['file']);
|
||||
$this->assertEquals('item file content', file_get_contents($_FILES['Item']['tmp_name']['file']));
|
||||
$this->assertStringEqualsFile($_FILES['Item']['tmp_name']['file'], 'item file content');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user