Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793413
NotifyNewCommitsToDiffusionTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1016 B
Referenced Files
None
Subscribers
None
NotifyNewCommitsToDiffusionTest.php
View Options
<?php
namespace
Nasqueron\Notifications\Tests\Jobs
;
use
Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion
;
use
Nasqueron\Notifications\Phabricator\PhabricatorAPI
;
use
Nasqueron\Notifications\Tests\TestCase
;
use
Mockery
;
class
NotifyNewCommitsToDiffusionTest
extends
TestCase
{
/**
* Mock for the Phabricator API factory
* @var \Mockery\MockInterface
*/
private
$apiFactoryMock
;
/**
* The job to test
* @var NotifyNewCommitsToDiffusion
*/
private
$job
;
public
function
setUp
()
{
parent
::
setUp
();
$this
->
apiFactoryMock
=
$this
->
mockPhabricatorAPI
();
$this
->
job
=
$this
->
mockJob
();
}
/**
* @return NotifyNewCommitsToDiffusion
*/
protected
function
mockJob
()
{
return
new
NotifyNewCommitsToDiffusion
(
"acme"
,
"ssh://acme/k2.git"
);
}
public
function
testJobWantsPhabricatorAPI
()
{
$this
->
apiFactoryMock
->
shouldReceive
(
'getForProject'
)->
once
();
$this
->
job
->
handle
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 21:45 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2437427
Default Alt Text
NotifyNewCommitsToDiffusionTest.php (1016 B)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment