pact-foundation / pact-php

PHP version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project
Apache License 2.0
273 stars 92 forks source link

refactor: Wrap ffi call > pactffi_with_multipart_file_v2 #644

Closed tienvx closed 1 month ago

tienvx commented 1 month ago

This is the first PR for wrapping ffi calls.

Currently, $this->ffi->call() and $this->ffi->get() accept arguments of any type, and return mixed value. There is no type safe. And static code analyzer (phpstan) will complain if we increase the level.

This PR replace calling $this->ffi->call('pactffi_with_multipart_file_v2') directly by creating a new method withMultipartFileV2 which receive expected arguments and return expected value.

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 11027868201

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/PhpPact/FFI/Client.php 17 22 77.27%
<!-- Total: 24 29 82.76% -->
Totals Coverage Status
Change from base Build 11025479316: -0.1%
Covered Lines: 2325
Relevant Lines: 2392

💛 - Coveralls