Releases: pl-github/functional-test-helpers
Releases · pl-github/functional-test-helpers
4.0.0
4.0.0 (2025-05-06)
Bug Fixes
- Add more robust query array parameter handling (959bf8d)
- Allow array query parameters (00c0f24)
- Allow assertions in mock request builder that() (703d5e7)
- Allow data multi-parts (0091853)
- Allow override of multipart file mimetype (da6f106)
- Check for 7z presence (98f09d8)
- deps: Update dependencies (5de0ace)
- Don not rely on possibly incorrect data TABLE_ROWS (65985a6)
- Drop PHP 8.1 support (272aa36)
- Drop thecodingmachine/safe < 2.0 support (94e9f35)
- http-client-mock: add content-length to body (f199f49)
- pass size to content cb in MockRequestBuilder (e52ff9e)
- Raise dependency versions, require php 8.3, require phpunit 11 (3d2715b)
- Raise phpstan level to 6 (8582e9d)
- Remove legacy check (6dc6ce7)
- Upgrade to phpstan 2, phpunit 12 and allow safe 3 (f7ed117)
- Use attributes for after and before (27cc7c3)
Features
- Improve multipart handling in request builder (9b48406)
- Provide UUID factory (5690fc2)
- Refactor http client mock (65320d4)
- Support 7z files (5638731)
- Support switching between Dama and normal Mysql Schema Strategy in a test run (bdd00d8)
BREAKING CHANGES
- Request matcher behaviour has changed for headers, queryParams, requestParams and multiparts
- Use MockRequestBuilder->multipart() instead of MockRequestBuilder->multipartFile()
- The functional test helpers now require phpunit 10.x+
3.0.0
3.0.0 (2024-02-13)
Bug Fixes
- Add authBearer() method on RequestBuilder (b0b862a)
- Add missing ArrayObject import (e3a19fe)
- Add semantic release config and github action (649ca8b)
- Add support for monolog 3.x (9bc372a)
- Add support for phpunit10 (267f986)
- Allow additional token parameters of every type (cfa8901)
- Allow all types as json data (97952ef)
- Allow body as callback in mocked requests (0a422f3)
- Allow doctrine/dbal 3.x (3e65eb1)
- Allow nested arrays of UploadedFiles for RequestBuilder::file() (fead0be)
- Allow thecodingmachine/safe >= 2.0 (b37984b)
- Apply options to application tester (ddf9045)
- Create correct snapshot file names in repetitions (d457616)
- Encode uri and query parameters (86e1397)
- Fix detection and cleanup of autogenerated json-ld identifiers (422f2d5)
- Fix phpunit 9.x compatibility (2bfc9b6)
- Fix wrong CommandTrait namespace (4fb9d9d)
- Fix wrong import (bd7129f)
- Show reason of all internal errors in unit test output (7e423b4)
- Support query parameters without value (d0b1a4d)
- Update coding standard (5e9e1d1)
- Upgrade code style (92ce8c4)
- Upgrade to phpunit 10, remove prophecy (a235768)
- Use version based tag name (8bd427b)
Features
- Add application tester (6fe3e2a)
- Add assertZipHasFileWithCrc() assertion for zip files (cddeec6)
- Add generateCsrfToken() for generating csrf tokens in request builder (62d1e92)
- Add json-ld support (8c8be60)
- Add more robust checking for missing Http Client Mock Requests (574f12e)
- Add named snapshots (54404ef)
- Add possibility to skip snapshot tests via SKIP_SNAPSHOT_TESTS env variable (7982686)
- Add session handling in request builder (8157191)
- Add that() for mock request builder (9c8a180)
- Add uuid trait (8983f53)
- Allow disable create snapshots (0e7fb7b)
- Allow multiple responses in mock request builder (431728a)
- Allow specifying authentication header directly (05151e4)
- Allow URI matching with callback (7fd980d)
- Provide mock response data as json (fc969bc)
- Support basic authentication (5db20f5)
- Support dama/doctrine-test-bundle in schema tests (13a51a2)
- Support HTML snapshots (fef1620)
- Support mysql based schema tests (6afc0ff)
- Support sqlite file based schema tests (754afd7)
BREAKING CHANGES
- Response handling in MockRequestBuilder has been changed
- hasException(), use hasResponse()
- getException(), use nextResponse()
- resetException(), use resetResponses()
- hasResponseBuilder(), use hasResponse()
- getResponseBuilder(), use nextResponse()
- resetResponseBuilder(), use resetResponses()
- willThrow() takes a throwable object as argument, instead of throwable classname and message
- willRespond(), willThrow() add responses to the stack instead of setting one response
- willAlwaysRespond() sets a single response that is always returned, not combinable with willRespond() and willThrow()
- Class NoMatchingMockRequestHandler and method expectNoMismatchingMockRequestsInLog() has been removed, use registerNoMatchingMockRequestAsserts()
- Namespace Brainbits\FunctionalTestHelpers\Command was renamed to to Brainbits\FunctionalTestHelpers\Console, change your imports accordingly.