Codeception / Codeception/lib-asserts

Suggestion: Add assertion that an array element is *before* another

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
105
Forks
5
PR merge metrics
No merged PRs in 30d

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:

```php
$searchresults = ['apple', 'orange'];
$I->assertIsBeforeInArray('apple', 'orange'); // I need to think about the function's name some more... ;-)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.