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

testContextActionWithEntrypoint() public method

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