Skip to content

Commit

Permalink
Version 4: RC3
Browse files Browse the repository at this point in the history
- has() for ListInterface
  • Loading branch information
seboettg committed Aug 7, 2022
1 parent ab0c0d7 commit 4dbffe7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/ArrayListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,12 @@ public function testSearchByShouldReturnNullIfNoElementMatches()
)->searchBy(fn (stdClass $item) => $item->lastname === "Meyer")
);
}

public function test_has_shouldReturnTrueIfIndexExistsOtherwiseFalse()
{
$this->assertTrue(listOf("a", "b", "c")->has(2));
$this->assertFalse(listOf("a", "b", "c")->has(3));
}
}

function stdclass($array): stdClass
Expand Down

0 comments on commit 4dbffe7

Please sign in to comment.