Nelmio\Alice\Generator\Resolver\Value\Chainable\FixturePropertyReferenceResolverTest::testThrowsAnExceptionIfReferenceResolvedIsNotAnObject PHP Method

testThrowsAnExceptionIfReferenceResolvedIsNotAnObject() public method

    public function testThrowsAnExceptionIfReferenceResolvedIsNotAnObject()
    {
        $value = new FixturePropertyValue($reference = new DummyValue('dummy'), $property = 'publicProperty');
        $instance = new Dummy();
        $instance->publicProperty = 'foo';
        $set = ResolvedFixtureSetFactory::create();
        $valueResolverProphecy = $this->prophesize(ValueResolverInterface::class);
        $valueResolverProphecy->resolve(Argument::cetera())->willReturn(new ResolvedValueWithFixtureSet('string value', $set));
        /** @var ValueResolverInterface $valueResolver */
        $valueResolver = $valueResolverProphecy->reveal();
        $resolver = new FixturePropertyReferenceResolver(PropertyAccess::createPropertyAccessor(), $valueResolver);
        $resolver->resolve($value, new FakeFixture(), $set, [], new GenerationContext());
    }