Last active
March 27, 2020 04:36
-
-
Save BashirShallah/8749a668f8b0d4436f2488eca2f85f22 to your computer and use it in GitHub Desktop.
JsonWithAuthHelpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\_utilities; | |
trait JsonWithAuthHelpers { | |
public function getJsonWithAuth($user, $uri, array $headers = []){ | |
return $this->be($user,'api')->getJson($uri, $headers); | |
} | |
public function postJsonWithAuth($user, $uri, array $data = [], array $headers = []){ | |
return $this->be($user,'api')->postJson($uri, $data, $headers); | |
} | |
public function putJsonWithAuth($user, $uri, array $data = [], array $headers = []){ | |
return $this->be($user,'api')->putJson($uri, $data, $headers); | |
} | |
public function deleteJsonWithAuth($user, $uri, array $data = [], array $headers = []){ | |
return $this->be($user,'api')->deleteJson($uri, $data, $headers); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment