Closed tienvx closed 8 months ago
Similar ffi function pactffi_with_header_v2
has this note:
NOTE: If you pass in a form with multiple values, the index will be ignored.
Probably we can implement a similar behavior for pactffi_with_query_parameter_v2
? For example, change value
from '1'
to ['1', '2', '3']
like this:
pactffi_with_query_parameter_v2($interactionId, 'pages', 0, '{"value":["1", "2", "3"],"regex":"\\d+","pact:matcher:type":"regex"}');
Then the index 0
will be ignored
If you specify the value as an array (i.e. "value":["1"]
) it will work as expected.
It works as expected, see https://github.com/pact-foundation/pact-php/pull/353
I will close this issue now, as it's not a bug.
I'm trying to match query to contain multiple values using ffi call but it doesn't work as I expected.
FFI call:
Http client query:
Trimmed logs about matching rule:
Expected: No mismatches for
pages
Actual: Mismatches with logs:
For more information:
pages
query) https://github.com/tienvx/pact-php/commit/4cd6be0f77265b4b1ff2d3efd9ff1625bdf64c93