Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117882602
DomainVerifyTest.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
DomainVerifyTest.php
View Options
<?php
namespace
Tests\Feature\Jobs
;
use
App\Jobs\DomainVerify
;
use
App\Domain
;
use
Illuminate\Support\Facades\Mail
;
use
Tests\TestCase
;
class
DomainVerifyTest
extends
TestCase
{
/**
* {@inheritDoc}
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
deleteTestDomain
(
'gmail.com'
);
$this
->
deleteTestDomain
(
'some-non-existing-domain.fff'
);
}
public
function
tearDown
():
void
{
$this
->
deleteTestDomain
(
'gmail.com'
);
$this
->
deleteTestDomain
(
'some-non-existing-domain.fff'
);
parent
::
tearDown
();
}
/**
* Test job handle (existing domain)
*
* @group dns
*/
public
function
testHandle
():
void
{
$domain
=
$this
->
getTestDomain
(
'gmail.com'
,
[
'status'
=>
Domain
::
STATUS_NEW
,
'type'
=>
Domain
::
TYPE_EXTERNAL
,
]
);
$this
->
assertFalse
(
$domain
->
isVerified
());
$job
=
new
DomainVerify
(
$domain
);
$job
->
handle
();
$this
->
assertTrue
(
$domain
->
fresh
()->
isVerified
());
}
/**
* Test job handle (non-existing domain)
*
* @group dns
*/
public
function
testHandleNonExisting
():
void
{
$domain
=
$this
->
getTestDomain
(
'some-non-existing-domain.fff'
,
[
'status'
=>
Domain
::
STATUS_NEW
,
'type'
=>
Domain
::
TYPE_EXTERNAL
,
]
);
$this
->
assertFalse
(
$domain
->
isVerified
());
$job
=
new
DomainVerify
(
$domain
);
$job
->
handle
();
$this
->
assertFalse
(
$domain
->
fresh
()->
isVerified
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Apr 6, 12:38 AM (6 d, 9 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18773865
Default Alt Text
DomainVerifyTest.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline