Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-28: Lazily build the handler #29

Merged
merged 1 commit into from
May 25, 2023

Conversation

doppiogancio
Copy link
Owner

    public function testLazyBuiltHandler(): void
    {
        $this->handlerBuilder->addRoute(
            $this->routeBuilder->new()
                ->withMethod('PATCH')
                ->withPath('/lazy/builder')
                ->withResponse(new Response(123))
                ->build(),
        );

        $response = $this->getMockedClient()->request('PATCH', '/lazy/builder');
        $this->assertEquals(123, $response->getStatusCode());
    }

@doppiogancio doppiogancio added the enhancement New feature or request label May 24, 2023
@doppiogancio doppiogancio force-pushed the ISSUE-28-lazily-build-the-handler branch from 512e07c to 59829c4 Compare May 24, 2023 22:20
Copy link
Collaborator

@guhemama guhemama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@doppiogancio doppiogancio force-pushed the ISSUE-28-lazily-build-the-handler branch from db393d2 to 1c81fba Compare May 25, 2023 08:52
@doppiogancio
Copy link
Owner Author

Only after doing some tests, I recognized that no change is needed in order to have the "lazy builder", it was already like this. I will keep the tests, so that can be used as examples.

@doppiogancio doppiogancio merged commit d8ace81 into main May 25, 2023
1 check passed
@doppiogancio doppiogancio linked an issue May 26, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lazily build the handler
2 participants