Flugg\Responder\Tests\Unit\SuccessResponseBuilderTest::setStatusMethodShouldReturnItself PHP Méthode

setStatusMethodShouldReturnItself() public méthode

Test that the [setStatus] method returns the response builder, allowing for fluent method chaining.
    public function setStatusMethodShouldReturnItself()
    {
        // Arrange...
        $responseBuilder = $this->app->make('responder.success');
        // Act...
        $result = $responseBuilder->setStatus(201);
        // Assert...
        $this->assertSame($responseBuilder, $result);
    }
SuccessResponseBuilderTest