Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1974566
TestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1010 B
Referenced Files
None
Subscribers
None
TestCase.php
View Options
<?php
namespace
Tests
;
use
Illuminate\Foundation\Testing\TestCase
as
BaseTestCase
;
abstract
class
TestCase
extends
BaseTestCase
{
use
TestCaseTrait
;
protected
function
backdateEntitlements
(
$entitlements
,
$targetDate
)
{
foreach
(
$entitlements
as
$entitlement
)
{
$entitlement
->
created_at
=
$targetDate
;
$entitlement
->
updated_at
=
$targetDate
;
$entitlement
->
save
();
$owner
=
$entitlement
->
wallet
->
owner
;
$owner
->
created_at
=
$targetDate
;
$owner
->
save
();
}
}
/**
* Set baseURL to the admin UI location
*/
protected
static
function
useAdminUrl
():
void
{
// This will set base URL for all tests in a file.
// If we wanted to access both user and admin in one test
// we can also just call post/get/whatever with full url
\config
([
'app.url'
=>
str_replace
(
'//'
,
'//admin.'
,
\config
(
'app.url'
))]);
url
()->
forceRootUrl
(
config
(
'app.url'
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Sep 14, 2:13 AM (30 m, 31 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
287317
Default Alt Text
TestCase.php (1010 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment