Functional\Tests\TailTest::test PHP Method

test() public method

public test ( )
    public function test()
    {
        $fn = function ($v, $k, $collection) {
            InvalidArgumentException::assertCollection($collection, __FUNCTION__, 1);
            return $v > 2;
        };
        $this->assertSame([2 => 3, 3 => 4], tail($this->list, $fn));
        $this->assertSame([2 => 3, 3 => 4], tail($this->listIterator, $fn));
        $this->assertSame([], tail($this->badArray, $fn));
        $this->assertSame([], tail($this->badIterator, $fn));
    }