Pinq\Tests\Integration\Collection\GroupJoinApplyTest::testThatApplyJoinPassesTheInnerAndOuterElements PHP Method

testThatApplyJoinPassesTheInnerAndOuterElements() public method

public testThatApplyJoinPassesTheInnerAndOuterElements ( Pinq\ICollection $collection, array $data )
$collection Pinq\ICollection
$data array
    public function testThatApplyJoinPassesTheInnerAndOuterElements(\Pinq\ICollection $collection, array $data)
    {
        $collection->groupJoin([1 => 0])->apply(function ($outer, \Pinq\ITraversable $group, $outerKey, $groupKey) use($data) {
            $this->assertSame($data[$outerKey], $outer);
            $this->assertSame($group->asArray(), [1 => 0]);
            $this->assertSame($groupKey, 0);
        });
    }