Pinq\Tests\Integration\Traversable\IntersectTest::testThatIntersectionWithDuplicateValuesPreservesTheOriginalKeys PHP Метод

testThatIntersectionWithDuplicateValuesPreservesTheOriginalKeys() публичный Метод

public testThatIntersectionWithDuplicateValuesPreservesTheOriginalKeys ( Pinq\ITraversable $traversable, array $data )
$traversable Pinq\ITraversable
$data array
    public function testThatIntersectionWithDuplicateValuesPreservesTheOriginalKeys(\Pinq\ITraversable $traversable, array $data)
    {
        $otherData = ['test' => 1, 'anotherkey' => 3, 1000 => 5];
        $intersection = $traversable->intersect(new \Pinq\Traversable($otherData));
        $this->assertMatches($intersection, array_intersect($data, $otherData));
    }