Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485099
DomainOwnerTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DomainOwnerTest.php
View Options
<?php
namespace
Tests\Feature
;
use
App\User
;
use
Illuminate\Support\Facades\Queue
;
use
Tests\TestCase
;
class
DomainOwnerTest
extends
TestCase
{
/**
* {@inheritDoc}
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
deleteTestUser
(
'jane@kolab.org'
);
}
/**
* {@inheritDoc}
*/
public
function
tearDown
():
void
{
$this
->
deleteTestUser
(
'jane@kolab.org'
);
parent
::
tearDown
();
}
public
function
testJohnCreateJane
():
void
{
$john
=
User
::
where
(
'email'
,
'john@kolab.org'
)->
first
();
$jane
=
User
::
create
(
[
'name'
=>
'Jane Doe'
,
'email'
=>
'jane@kolab.org'
,
'password'
=>
'simple123'
,
'email_verified_at'
=>
now
()
]
);
$package
=
\App\Package
::
withEnvTenantContext
()->
where
(
'title'
,
'kolab'
)->
first
();
$mailbox_sku
=
\App\Sku
::
withEnvTenantContext
()->
where
(
'title'
,
'mailbox'
)->
first
();
$john
->
assignPackage
(
$package
,
$jane
);
// assert jane has a mailbox entitlement
$this
->
assertCount
(
7
,
$jane
->
entitlements
);
$this
->
assertCount
(
1
,
$jane
->
entitlements
()->
where
(
'sku_id'
,
$mailbox_sku
->
id
)->
get
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Nov 20, 10:49 PM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387329
Default Alt Text
DomainOwnerTest.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment