Suggestion: Add assertion that an array element is *before* another
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by locating existing array assertion methods and their tests in the repository. Use the issue's ['apple', 'orange'] example to clarify the expected ordering assertion, including how the method should be named and what happens when either element is absent. Done means the new assertion is covered by tests and supports checking that one array element precedes another.
Written by the indexing model from the issue text.
Description
Sometimes I'd need a method to assert that in an array, one element comes before another. E.g. when testing things like search functions, where the order does matter.
Right now I'm using some lengthy workaround. But something like this would be nicer:
$searchresults = ['apple', 'orange'];
$I->assertIsBeforeInArray('apple', 'orange'); // I need to think about the function's name some more... ;-)
- Dominant language
- PHP
- Stars
- 105
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
jira-created
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
nunomaduro/phpinsights#745 ·
-
status/awaiting_triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
WordPress/plugin-check#1486 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
az-digital/az_quickstart#6019 ·