Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8222099
VerifyTest.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
VerifyTest.php
View Options
<?php
namespace
Tests\Feature\Console\User
;
use
Illuminate\Support\Facades\Queue
;
use
Tests\TestCase
;
class
VerifyTest
extends
TestCase
{
/**
* {@inheritDoc}
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
deleteTestUser
(
'user@force-delete.com'
);
}
/**
* {@inheritDoc}
*/
public
function
tearDown
():
void
{
$this
->
deleteTestUser
(
'user@force-delete.com'
);
parent
::
tearDown
();
}
/**
* Test the command
*/
public
function
testHandle
():
void
{
Queue
::
fake
();
// Non-existing user
$code
=
\Artisan
::
call
(
"user:verify unknown"
);
$output
=
trim
(
\Artisan
::
output
());
$this
->
assertSame
(
1
,
$code
);
$this
->
assertSame
(
"User not found."
,
$output
);
$user
=
$this
->
getTestUser
(
'user@force-delete.com'
);
// Test success
$code
=
\Artisan
::
call
(
"user:verify {$user->email}"
);
$output
=
trim
(
\Artisan
::
output
());
$this
->
assertSame
(
0
,
$code
);
$this
->
assertSame
(
""
,
$output
);
// TODO: Test the verification utility error conditions
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 9, 7:45 PM (2 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1056440
Default Alt Text
VerifyTest.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment