Cookie\UriMatchesTest: improve and stabilize - #737
Merged
schlessera merged 6 commits intoJun 20, 2022
Merged
Conversation
… array Helper function to convert a simple, single-level text array to a data provider with named test cases, where the value of the test case is the same as the name of the test case. Includes adding an exception to the PHPCS ruleset for test code.
This commit: * Adds descriptive names to each of the cases being tested via the data provider. * Adds keys to the parameters passed for each test case to make it easier to understand the test case. * Improves the inline documentation in the data provider.
…bility improvements
Refactor the test to use a data provider and cover all possible situations. Includes: * Adding the `$message` parameter to assertions. * Adding a docblock to the test.
jrfnl
force-pushed
the
feature/497-cookie-urimatches-test-improve-and-stabilize
branch
from
May 10, 2022 23:02
80968ff to
937a0b6
Compare
16 tasks
schlessera
approved these changes
Jun 20, 2022
schlessera
approved these changes
Jun 20, 2022
schlessera
deleted the
feature/497-cookie-urimatches-test-improve-and-stabilize
branch
June 20, 2022 10:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestCase: add helper function to create a data provider from a simple array
Helper function to convert a simple, single-level text array to a data provider with named test cases, where the value of the test case is the same as the name of the test case.
Includes adding an exception to the PHPCS ruleset for test code.
Cookie\UriMatchesTest::testUrlMatch*(): use named data provider
This commit:
Cookie\UriMatchesTest::testUrlMatch*(): minor documentation and readability improvements
Cookie\UriMatchesTest::testUrlMatchSecure(): improve test
Refactor the test to use a data provider and cover all possible situations.
Includes:
$messageparameter to assertions.Cookie\UriMatchesTest::testUrlMatchManuallySet(): refactor to data provider
Cookie\UriMatchesTest::testUrlMatchManuallySet(): add extra test case
Related to #497