Codeception / Codeception/lib-asserts

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

Aperta
#8 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
105
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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... ;-)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.