public it_double_instantiates_a_class_with_constructor_argument ( $mirror, ReflectionClass $class, Prophecy\Doubler\Generator\Node\ClassNode $node, $namer ) | ||
$class | ReflectionClass | |
$node | Prophecy\Doubler\Generator\Node\ClassNode |
function it_double_instantiates_a_class_with_constructor_argument($mirror, \ReflectionClass $class, ClassNode $node, $namer)
{
$class->getName()->willReturn('ReflectionClass');
$mirror->reflect($class, array())->willReturn($node);
$namer->name($class, array())->willReturn('ReflectionClass');
$double = $this->double($class, array(), array('stdClass'));
$double->shouldBeAnInstanceOf('ReflectionClass');
$double->getName()->shouldReturn('stdClass');
}