Pinq\Tests\Integration\Traversable\GroupJoinTest::testThatGroupJoinWithDefaultDoesNotSupplyDefaultElementWhenThereAreMatchingInnerElements PHP Method

testThatGroupJoinWithDefaultDoesNotSupplyDefaultElementWhenThereAreMatchingInnerElements() public method

public testThatGroupJoinWithDefaultDoesNotSupplyDefaultElementWhenThereAreMatchingInnerElements ( Pinq\ITraversable $traversable, array $data )
$traversable Pinq\ITraversable
$data array
    public function testThatGroupJoinWithDefaultDoesNotSupplyDefaultElementWhenThereAreMatchingInnerElements(\Pinq\ITraversable $traversable, array $data)
    {
        $traversable = $traversable->groupJoin([1])->on(function () {
            return true;
        })->withDefault(null, null)->to(function ($outer, \Pinq\ITraversable $innerGroup) {
            return $innerGroup->asArray();
        });
        $this->assertMatches($traversable, empty($data) ? [] : array_fill(0, count($data), [1]));
    }