Skip to content

Commit

Permalink
Testing existing feature (#19847)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbowers authored and taylorotwell committed Jul 1, 2017
1 parent a3ee69e commit 0d0427d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,28 @@ public function testFilter()
})->all());
}

public function testHigherOrderFilter()
{
$c = new Collection([
new class {
public $name = 'Alex';

public function active() {
return true;
}
},
new class {
public $name = 'John';

public function active() {
return false;
}
}
]);

$this->assertCount(1, $c->filter->active());
}

public function testWhere()
{
$c = new Collection([['v' => 1], ['v' => 2], ['v' => 3], ['v' => '3'], ['v' => 4]]);
Expand Down

0 comments on commit 0d0427d

Please sign in to comment.