Closed tienvx closed 9 months ago
I have tried several solutions:
Content-Type
header
pactffi_with_header_v2
need to be called with Content-Type
before pactffi_with_multipart_file
pactffi_with_multipart_boundary
pactffi_with_multipart_boundary
need to be called after pactffi_with_multipart_file
pactffi_with_multipart_file_v2
, similar to pactffi_with_multipart_file
but with additional parameter boundary
boundary
parameter directly to pactffi_with_multipart_file
Currently boundary is random, so the pact is generated differently each time I run consumer test:
Here is how to reproduce it:
git clone https://github.com/pact-foundation/pact-php.git
cd pact-php
git checkout ffi
composer install
cd example/multipart/consumer/
PACT_LOGLEVEL=trace phpunit
example/multipart/pacts/multipartConsumer-multipartProvider.json
should not be changedexample/multipart/pacts/multipartConsumer-multipartProvider.json
is changed because of the dynamic boundaryAccording to this article this behavior should be avoid.