Skip to content

Add implementation of OpenApiServerMockerInterface #2

Description

@ybelenko

I'm creating first implementation of OpenAPIServer\Mock\OpenApiServerMockerInterface

This class is crucial for server unit tests.
For example, when I need to test createUser API operation I need to mock valid Psr\Http\Message\ServerRequestInterface instance based on OAS3.0 Path Item Object and pass it to server handler. That's what OpenAPIServer\Mock\OpenApiServerMockerInterface::mockRequest method has been created for:

    public function mockRequest(
        string $path,
        string $method,
        ?array $parameters = null,
        ?array $requestBody = null,
        ?array $security = null,
        ?array $callbacks = null
    ): ServerRequestInterface;

I submit this issue just to show what I'm working on right now!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions