Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 778b03b

Browse files
committed
Provides more accurate test method names
Describe what scenario is being tested!
1 parent 38bcdc1 commit 778b03b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/functions/NormalizeUploadedFilesTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<?php
22
/**
33
* @see https://github.com/zendframework/zend-diactoros for the canonical source repository
4-
* @copyright Copyright (c) 2015-2017 Zend Technologies USA Inc. (http://www.zend.com)
4+
* @copyright Copyright (c) 2018 Zend Technologies USA Inc. (http://www.zend.com)
55
* @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License
66
*/
77

88
namespace ZendTest\Diactoros;
99

1010
use PHPUnit\Framework\TestCase;
1111
use Psr\Http\Message\UploadedFileInterface;
12+
1213
use function Zend\Diactoros\normalizeUploadedFiles;
1314

1415
class NormalizeUploadedFilesTest extends TestCase
1516
{
16-
public function testFlatFile()
17+
public function testCreatesUploadedFileFromFlatFileSpecification()
1718
{
1819
$files = [
1920
'avatar' => [
@@ -32,7 +33,7 @@ public function testFlatFile()
3233
$this->assertEquals('my-avatar.png', $normalised['avatar']->getClientFilename());
3334
}
3435

35-
public function testNestedFile()
36+
public function testTraversesNestedFileSpecificationToExtractUploadedFile()
3637
{
3738
$files = [
3839
'my-form' => [
@@ -54,7 +55,7 @@ public function testNestedFile()
5455
$this->assertEquals('my-avatar.png', $normalised['my-form']['details']['avatar']->getClientFilename());
5556
}
5657

57-
public function testNumericIndexedFiles()
58+
public function testTraversesNestedFileSpecificationContainingNumericIndicesToExtractUploadedFiles()
5859
{
5960
$files = [
6061
'my-form' => [
@@ -99,9 +100,10 @@ public function testNumericIndexedFiles()
99100
}
100101

101102
/**
102-
* This case covers upfront numeric index which moves the tmp_name/size/etc fields further up the array tree
103+
* This case covers upfront numeric index which moves the tmp_name/size/etc
104+
* fields further up the array tree
103105
*/
104-
public function testNumericFirstIndexedFiles()
106+
public function testTraversesDenormalizedNestedTreeOfIndicesToExtractUploadedFiles()
105107
{
106108
$files = [
107109
'slide-shows' => [

0 commit comments

Comments
 (0)