iter\IterTest::testProduct PHP Метод

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

public testProduct ( )
    public function testProduct()
    {
        $this->assertKeysValues([[]], [[]], function () {
            return product();
        });
        $this->assertKeysValues([[0], [1]], [[1], [2]], function () {
            return product([1, 2]);
        });
        $this->assertKeysValues([[0, 0], [0, 1], [1, 0], [1, 1]], [[1, 3], [1, 4], [2, 3], [2, 4]], function () {
            return product([1, 2], [3, 4]);
        });
        $this->assertKeysValues([[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]], [[1, 1, 1], [1, 1, 2], [1, 2, 1], [1, 2, 2], [2, 1, 1], [2, 1, 2], [2, 2, 1], [2, 2, 2]], function () {
            return product(range(1, 2), [1, 2], new \ArrayIterator([1, 2]));
        });
    }