Set airport and landing time of aircraft after pirep accept #112

This commit is contained in:
Nabeel Shahzad
2018-01-10 12:39:13 -06:00
parent 2f33c7b6aa
commit dce9723979
5 changed files with 47 additions and 5 deletions

View File

@@ -111,14 +111,17 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
* Override the GET call to inject the user API key
* @param string $uri
* @param array $headers
* @param null $user
* @return \Illuminate\Foundation\Testing\TestResponse
*/
public function get($uri, array $headers=[]): \Illuminate\Foundation\Testing\TestResponse
public function get($uri, array $headers=[], $user=null): \Illuminate\Foundation\Testing\TestResponse
{
if(empty($headers)) {
if($this->user !== null) {
$headers = $this->headers($this->user);
}
if($this->user !== null) {
$headers = $this->headers($this->user);
}
if($user !== null) {
$headers['x-api-key'] = $user->api_key;
}
return parent::get($uri, $headers);