tests/Functional/OrdersControllerTest.php
/**
     * Should create a order in staging.
     *
     * @return void
     */
Should create a order in staging.
@return void
Should create a order in staging . @return void
public function testCreateOrderSuccessful(): void
    {
        $payload = $this->getPayload();
        $mocked = \Mockery::mock(QuadxClientInterface::class);
        $mocked->shouldReceive('request')
            ->once()
            ->andReturn([
                'body' => 'some-body'
            ]);
        $this->app->instance(QuadxClientInterface::class, $mocked);
        $this->json('POST', '/orders', $payload);
        $this->assertResponseStatus(201);
    }
public function testCreateOrderSuccessful ( ) : void { $ payload = $ this -> getPayload ( ) ; $ mocked = \ Mockery :: mock ( QuadxClientInterface :: class ) ; $ mocked -> shouldReceive ( 'request' ) -> once ( ) -> andReturn ( [ 'body' => 'some-body' ] ) ; $ this -> app -> instance ( QuadxClientInterface :: class , $ mocked ) ; $ this -> json ( 'POST' , '/orders' , $ payload ) ; $ this -> assertResponseStatus ( 201 ) ; }
Should create a order in staging.
Should create a order in staging .