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

Commit f38c319

Browse files
committed
qa: adds tests for #378
1 parent d4dec99 commit f38c319

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/UploadedFileTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPUnit\Framework\TestCase;
1414
use ReflectionProperty;
1515
use RuntimeException;
16+
use SplFileInfo;
1617
use Zend\Diactoros\Stream;
1718
use Zend\Diactoros\UploadedFile;
1819

@@ -325,4 +326,13 @@ public function testMoveToRaisesExceptionWithAppropriateMessageWhenUploadErrorDe
325326
$this->expectExceptionMessage($message);
326327
$uploadedFile->moveTo('/tmp/foo');
327328
}
329+
330+
/**
331+
* @see https://github.com/zendframework/zend-diactoros/pull/378
332+
*/
333+
public function testExtendsSplFileInfo()
334+
{
335+
$uploaded = new UploadedFile(fopen('php://temp', 'wb+'), 0, UPLOAD_ERR_OK);
336+
$this->assertInstanceOf(SplFileInfo::class, $uploaded);
337+
}
328338
}

0 commit comments

Comments
 (0)