Ouzo\Utilities\Iterator\FluentIteratorTest::shouldThrowExceptionIfFirstCalledForEmptyIterator PHP Method

shouldThrowExceptionIfFirstCalledForEmptyIterator() public method

    public function shouldThrowExceptionIfFirstCalledForEmptyIterator()
    {
        //given
        $iterator = FluentIterator::fromArray(array());
        // when
        CatchException::when($iterator)->first();
        // then
        CatchException::assertThat()->isInstanceOf('\\InvalidArgumentException');
    }