ApiPlatform\Core\Tests\JsonLd\Action\ContextActionTest::testContextActionWithContexts PHP Method

testContextActionWithContexts() public method

    public function testContextActionWithContexts()
    {
        $contextBuilderProphecy = $this->prophesize(ContextBuilderInterface::class);
        $resourceNameCollectionFactoryProphecy = $this->prophesize(ResourceNameCollectionFactoryInterface::class);
        $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataFactoryInterface::class);
        $contextBuilderProphecy->getBaseContext()->willReturn(['/contexts']);
        $contextAction = new ContextAction($contextBuilderProphecy->reveal(), $resourceNameCollectionFactoryProphecy->reveal(), $resourceMetadataFactoryProphecy->reveal());
        $this->assertEquals(['@context' => ['/contexts']], $contextAction('Error'));
    }