Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Mocking an interface that says it extends Traversable requires adding an iterator to the mock #59

Closed
koden-km opened this issue Jan 6, 2015 · 0 comments

Comments

@koden-km
Copy link

koden-km commented Jan 6, 2015

Example:

interface SomeThingInterface extends \Traversable
{
}

Doing this will fatal:

$this->thing = Phony::mock(SomeThingInterface::class)

Work around requires adding IteratorAggregate as the first argument to the mock types:

$this->thing = Phony::mock(
    [
        IteratorAggregate::class,
        SomeThingInterface::class,
    ]
);
@ezzatron ezzatron added this to the 0.3.0 milestone Jan 6, 2015
@ezzatron ezzatron modified the milestones: 0.3.0, 0.2.1 Feb 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants