Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120835031
StripeMockClient.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
591 B
Referenced Files
None
Subscribers
None
StripeMockClient.php
View Options
<?php
namespace
Tests
;
use
Stripe
as
StripeAPI
;
class
StripeMockClient
implements
StripeAPI\HttpClient\ClientInterface
{
private
$responses
=
[];
public
function
request
(
$method
,
$absUrl
,
$headers
,
$params
,
$hasFile
)
{
if
(
empty
(
$this
->
responses
))
{
throw
new
\Exception
(
"StripeMockClient: Missing response for $absUrl."
);
}
$response
=
array_shift
(
$this
->
responses
);
return
$response
;
}
public
function
addResponse
(
$body
,
$code
=
200
,
$headers
=
[])
{
$this
->
responses
[]
=
[
$body
,
$code
,
$headers
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 1:12 PM (6 d, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
18/cd/88ee2ecc7708822a8a3f43c2fdfb
Default Alt Text
StripeMockClient.php (591 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline