Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100488924
ConduitCallTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 31, 05:05
Size
657 B
Mime Type
text/x-php
Expires
Sun, Feb 2, 05:05 (2 d)
Engine
blob
Format
Raw Data
Handle
23976128
Attached To
rPH Phabricator
ConduitCallTestCase.php
View Options
<?php
final
class
ConduitCallTestCase
extends
PhabricatorTestCase
{
public
function
testConduitPing
()
{
$call
=
new
ConduitCall
(
'conduit.ping'
,
array
());
$call
->
setForceLocal
(
true
);
$result
=
$call
->
execute
();
$this
->
assertFalse
(
empty
(
$result
));
}
public
function
testConduitAuth
()
{
$call
=
new
ConduitCall
(
'user.whoami'
,
array
(),
true
);
$call
->
setForceLocal
(
true
);
$caught
=
null
;
try
{
$result
=
$call
->
execute
();
}
catch
(
ConduitException
$ex
)
{
$caught
=
$ex
;
}
$this
->
assertTrue
(
(
$caught
instanceof
ConduitException
),
'user.whoami should require authentication'
);
}
}
Event Timeline
Log In to Comment