padraic/mockery — pull request #125 by alexdenvir (2013-02-11 12:12:26+00:00)
Title: When creating a mock, do not implement \Iterator if \IteratorAggregate i...

...s in the extended interfaces

When creating a mock from an interface that extends \IteratorAggregate, \Mockery\Generator will check the extended interfaces for Traversible. If found without \Iterator, the definition for the mock class will implement \Iterator.

This results in a fatal error:
~~~
PHPUnit_Framework_Exception: PHP Fatal error: Class Mockery_511835b8a33e9 cannot implement both IteratorAggregate and Iterator at the same time
~~~

This pull request make an addition to this check - the mock class definition will no longer implement \Iterator if somewhere down the line it already implements \IteratorAggregate