Skip to content

Commit

Permalink
Update SubsetFinderTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
n1crack committed Feb 9, 2024
1 parent 572cf9c commit 3870043
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/SubsetFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
]);
});

it('returns blank if it doesnt find anything', function() {
it('can return empty if there is no subset found', function() {
$collection = collect([
$this->mockSubsetable(1, 11, 15),
$this->mockSubsetable(2, 6, 5),
Expand All @@ -87,13 +87,13 @@
$subsetFinder->solve();

expect($subsetFinder->getSubsetQuantity())->toBe(0)
// blank array
// empty array
->and($this->convertToArray($subsetFinder->getFoundSubsets()))->toBe([])
// its same as the collection
->and($this->convertToArray($subsetFinder->getRemaining()))->toBe($this->convertToArray($collection));
});

it('can cover all items in the collection ', function() {
it('can cover all items in the collection and remaining will be empty array ', function() {
$collection = collect([
$this->mockSubsetable(1, 11, 15),
$this->mockSubsetable(2, 6, 5),
Expand Down Expand Up @@ -183,7 +183,7 @@
]);
});

it('can get n many items as ordered', function() {
it('can get "n" many items by current order', function() {
$collection = collect([
$this->mockSubsetable(1, 11, 15),
$this->mockSubsetable(2, 6, 5),
Expand Down

0 comments on commit 3870043

Please sign in to comment.