Skip to content

Commit 5f199c1

Browse files
committed
minor symfony#57994 [Mime]  fix test (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [Mime]  fix test | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT updates the test added in symfony#57892 to reflect the change of behavior introduced with symfony#52033 Commits ------- 2e8b9ce fix test
2 parents 0dfaf96 + 2e8b9ce commit 5f199c1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Symfony/Component/Mime/Tests/Part/Multipart/FormDataPartTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,13 @@ public function testBoundaryContentTypeHeader()
244244
);
245245
}
246246

247-
public function testConstructThrowsOnUnexpectedFieldType()
247+
public function testGetPartsThrowsOnUnexpectedFieldType()
248248
{
249+
$dataPart = new FormDataPart(['foo' => new \stdClass()]);
250+
249251
$this->expectException(InvalidArgumentException::class);
250-
$this->expectExceptionMessage('A form field value can only be a string, an array, or an instance of TextPart ("stdClass" given).');
252+
$this->expectExceptionMessage('The value of the form field "foo" can only be a string, an array, or an instance of TextPart, "stdClass" given.');
251253

252-
new FormDataPart(['foo' => new \stdClass()]);
254+
$dataPart->getParts();
253255
}
254256
}

0 commit comments

Comments
 (0)