mirror of
https://github.com/archtechx/enums.git
synced 2025-12-12 18:44:04 +00:00
Add tests that satisfy the ArrayIterator branch
This commit is contained in:
parent
633f1703a0
commit
06b17354af
1 changed files with 5 additions and 0 deletions
|
|
@ -23,6 +23,11 @@ it('the in method checks for presence in an array', function () {
|
|||
expect(Status::PENDING->in([Status::PENDING, Status::DONE]))->toBeTrue();
|
||||
expect(Role::ADMIN->in([Role::ADMIN]))->toBeTrue();
|
||||
|
||||
$iterator = new ArrayIterator([Status::PENDING, Status::DONE]);
|
||||
expect(Status::PENDING->in($iterator))->toBeTrue();
|
||||
expect(Status::DONE->in($iterator))->toBeTrue();
|
||||
expect(Status::PENDING->in(new ArrayIterator([Role::ADMIN, Role::GUEST])))->toBeFalse();
|
||||
|
||||
expect(Status::PENDING->in([Status::DONE]))->toBeFalse();
|
||||
expect(Status::PENDING->in([Role::ADMIN, Role::GUEST]))->toBeFalse();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue