Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485311
GroupsTest.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
GroupsTest.php
View Options
<?php
namespace
Tests\Feature\Console\User
;
use
Tests\TestCase
;
class
GroupsTest
extends
TestCase
{
/**
* {@inheritDoc}
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
deleteTestGroup
(
'group-test@kolab.org'
);
}
/**
* {@inheritDoc}
*/
public
function
tearDown
():
void
{
$this
->
deleteTestGroup
(
'group-test@kolab.org'
);
parent
::
tearDown
();
}
/**
* Test command runs
*/
public
function
testHandle
():
void
{
$code
=
\Artisan
::
call
(
"user:groups unknown"
);
$output
=
trim
(
\Artisan
::
output
());
$this
->
assertSame
(
1
,
$code
);
$this
->
assertSame
(
"No such user unknown"
,
$output
);
$john
=
$this
->
getTestUser
(
'john@kolab.org'
);
$group
=
$this
->
getTestGroup
(
'group-test@kolab.org'
);
$group
->
assignToWallet
(
$john
->
wallets
->
first
());
$code
=
\Artisan
::
call
(
"user:groups john@kolab.org --attr=name"
);
$output
=
trim
(
\Artisan
::
output
());
$this
->
assertSame
(
0
,
$code
);
$this
->
assertSame
(
"{$group->id} {$group->name}"
,
$output
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 21, 3:39 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387518
Default Alt Text
GroupsTest.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment