Skip to content

Commit

Permalink
Revert "implements requests expectations"
Browse files Browse the repository at this point in the history
This reverts commit f68a277.
  • Loading branch information
fabio-ivona committed Apr 3, 2023
1 parent 7230d1b commit df5f898
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions src/Expectations/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
use Pest\Expectation;
use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\ExpectationFailedException;
use function Pest\Laravel\delete;
use function Pest\Laravel\deleteJson;
use function Pest\Laravel\get;
use function Pest\Laravel\getJson;
use function Pest\Laravel\patch;
use function Pest\Laravel\patchJson;
use function Pest\Laravel\post;
use function Pest\Laravel\postJson;
use function Pest\Laravel\put;
use function Pest\Laravel\putJson;

function getTestableResponse(Expectation $expectation): TestResponse
{
Expand All @@ -35,46 +25,6 @@ function getTestableResponse(Expectation $expectation): TestResponse
return TestResponse::fromBaseResponse($response);
}

expect()->extend('get', function(string $uri, array $headers = []){
return expect(get($uri, $headers));
});

expect()->extend('getJson', function(string $uri, array $headers = []){
return expect(getJson($uri, $headers));
});

expect()->extend('post', function(string $uri, array $data = [], array $headers = []){
return expect(post($uri, $headers));
});

expect()->extend('postJson', function(string $uri, array $data = [], array $headers = []){
return expect(postJson($uri, $headers));
});

expect()->extend('put', function(string $uri, array $data = [], array $headers = []){
return expect(put($uri, $headers));
});

expect()->extend('putJson', function(string $uri, array $data = [], array $headers = []){
return expect(putJson($uri, $headers));
});

expect()->extend('patch', function(string $uri, array $data = [], array $headers = []){
return expect(patch($uri, $headers));
});

expect()->extend('patchJson', function(string $uri, array $data = [], array $headers = []){
return expect(patchJson($uri, $headers));
});

expect()->extend('delete', function(string $uri, array $data = [], array $headers = []){
return expect(delete($uri, $headers));
});

expect()->extend('deleteJson', function(string $uri, array $data = [], array $headers = []){
return expect(deleteJson($uri, $headers));
});

expect()->extend(
'toBeRedirect',
/**
Expand Down

0 comments on commit df5f898

Please sign in to comment.