ddnrnboobaql / hamcrest

Automatically exported from code.google.com/p/hamcrest
0 stars 0 forks source link

PHP: anArray() name is misleading #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It sounds like the matcher checks that the given value is an array, but it 
actually pairs up each value in the given array against the matcher under the 
same key.

How about matchesEach() or matchesArray()?

Original issue reported on code.google.com by emperorf...@gmail.com on 2 Jul 2010 at 10:15

GoogleCodeExporter commented 9 years ago
The anArray() method name comes from the Java API. Confusing or not it does 
what the Java method does and should not be changed.

I added arrayValue() to assert that $actual is an array without checking its 
contents.

Original comment by dharkn...@gmail.com on 26 Jul 2010 at 9:47