Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Aug 13, 2024
1 parent ab2adc7 commit dba5d5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Tests/Part/Multipart/FormDataPartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ public function testBoundaryContentTypeHeader()
);
}

public function testConstructThrowsOnUnexpectedFieldType()
public function testGetPartsThrowsOnUnexpectedFieldType()
{
$dataPart = new FormDataPart(['foo' => new \stdClass()]);

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('A form field value can only be a string, an array, or an instance of TextPart ("stdClass" given).');
$this->expectExceptionMessage('The value of the form field "foo" can only be a string, an array, or an instance of TextPart, "stdClass" given.');

new FormDataPart(['foo' => new \stdClass()]);
$dataPart->getParts();
}
}

0 comments on commit dba5d5f

Please sign in to comment.