NsplTest\ATest::testPairs PHP Method

testPairs() public method

public testPairs ( )
    public function testPairs()
    {
        $this->assertEquals([[0, 'a'], [1, 'b'], [2, 'c']], pairs(['a', 'b', 'c']));
        $this->assertEquals([['a', 'hello'], ['b', 'world'], ['c', 42]], pairs(array('a' => 'hello', 'b' => 'world', 'c' => 42)));
        $this->assertEquals([], pairs([]));
        $this->assertEquals([[0, 'a'], [1, 'b'], [2, 'c']], call_user_func(pairs, ['a', 'b', 'c']));
        $this->assertEquals([['a', 'hello'], ['b', 'world'], ['c', 42]], call_user_func(pairs, array('a' => 'hello', 'b' => 'world', 'c' => 42)));
        $this->assertEquals([], call_user_func(pairs, []));
    }