Code Duplication    Length = 7-7 lines in 2 locations

tests/UploadedFileTest.php 2 locations

@@ 96-102 (lines=7) @@
93
    /**
94
     * @dataProvider invalidFilenamesAndMediaTypes
95
     */
96
    public function testRaisesExceptionOnInvalidClientFilename($filename)
97
    {
98
        $this->expectException(\InvalidArgumentException::class);
99
        $this->expectExceptionMessage('filename');
100
101
        new UploadedFile(fopen('php://temp', 'wb+'), 0, UPLOAD_ERR_OK, $filename);
102
    }
103
104
    /**
105
     * @dataProvider invalidFilenamesAndMediaTypes
@@ 107-113 (lines=7) @@
104
    /**
105
     * @dataProvider invalidFilenamesAndMediaTypes
106
     */
107
    public function testRaisesExceptionOnInvalidClientMediaType($mediaType)
108
    {
109
        $this->expectException(\InvalidArgumentException::class);
110
        $this->expectExceptionMessage('media type');
111
112
        new UploadedFile(fopen('php://temp', 'wb+'), 0, UPLOAD_ERR_OK, 'foobar.baz', $mediaType);
113
    }
114
115
    public function testGetStreamReturnsOriginalStreamObject()
116
    {