hamcrest / hamcrest-php

PHP Hamcrest implementation [Official]
Other
6.96k stars 44 forks source link

Wrong array pointer at end of _elementMatchers in SeriesMatchingOnce.php#34 #28

Open h4cc opened 9 years ago

h4cc commented 9 years ago

When running the test with HHVM, a unexpected behaviour appears in https://github.com/hamcrest/hamcrest-php/blob/master/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php#L34 in this line:

$nextMatcher = current($this->_elementMatchers);

Failing travis build: https://travis-ci.org/hamcrest/hamcrest-php/jobs/65859156

The problem was encountered in this Pull-Request: #27

Even though the array still contains 3 matchers, the function current return false because the internal array point is at the end of the file.

Todo: