Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120837271
TestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
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
Fri, Apr 24, 1:42 PM (1 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18807201
Default Alt Text
TestCase.php (1010 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline