Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110352306
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, Apr 25, 22:37
Size
657 B
Mime Type
text/x-php
Expires
Sun, Apr 27, 22:37 (2 d)
Engine
blob
Format
Raw Data
Handle
25777132
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