* SimBrief integration #405 * Add briefing as API response; add acars_xml field #405
This commit is contained in:
@@ -125,6 +125,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
return file_get_contents($p);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,6 +151,26 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
app()->instance(Client::class, $guzzleClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*/
|
||||
public function mockXmlResponse($filename)
|
||||
{
|
||||
$mock = new MockHandler([
|
||||
new Response(
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'text/xml',
|
||||
],
|
||||
$this->readDataFile($filename)
|
||||
),
|
||||
]);
|
||||
|
||||
$handler = HandlerStack::create($mock);
|
||||
$guzzleClient = new Client(['handler' => $handler]);
|
||||
app()->instance(Client::class, $guzzleClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a setting
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user