Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120824936
UserTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
UserTest.php
View Options
<?php
namespace
Tests\Feature
;
use
App\User
;
use
Tests\TestCase
;
use
Illuminate\Foundation\Testing\WithFaker
;
use
Illuminate\Foundation\Testing\RefreshDatabase
;
class
UserTest
extends
TestCase
{
/**
Verify a wallet assigned a controller is among the accounts of the assignee.
@return void
*/
public
function
testListUserAccounts
()
{
$userA
=
User
::
firstOrCreate
(
[
'email'
=>
'UserAccountA@UserAccount.com'
]
);
$this
->
assertTrue
(
$userA
->
wallets
()->
count
()
==
1
);
$userA
->
wallets
()->
each
(
function
(
$wallet
)
{
$userB
=
User
::
firstOrCreate
(
[
'email'
=>
'UserAccountB@UserAccount.com'
]
);
$wallet
->
addController
(
$userB
);
}
);
$userB
=
User
::
firstOrCreate
(
[
'email'
=>
'UserAccountB@UserAccount.com'
]
);
$this
->
assertTrue
(
$userB
->
accounts
()->
get
()[
0
]->
id
===
$userA
->
wallets
()->
get
()[
0
]->
id
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:30 AM (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18773070
Default Alt Text
UserTest.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline