Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1841144
StripeMocksTrait.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
528 B
Referenced Files
None
Subscribers
None
StripeMocksTrait.php
View Options
<?php
namespace
Tests
;
use
Stripe
as
StripeAPI
;
trait
StripeMocksTrait
{
/**
* Mock Stripe's HTTP client
*
* @return \Tests\StripeMockClient
*/
public
function
mockStripe
()
{
$mockClient
=
new
StripeMockClient
();
StripeAPI\ApiRequestor
::
setHttpClient
(
$mockClient
);
return
$mockClient
;
}
public
function
unmockStripe
()
{
$curlClient
=
StripeAPI\HttpClient\CurlClient
::
instance
();
StripeAPI\ApiRequestor
::
setHttpClient
(
$curlClient
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Aug 25, 2:22 PM (2 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
218607
Default Alt Text
StripeMocksTrait.php (528 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment