Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F66395646
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
Mon, Jun 10, 06:27
Size
657 B
Mime Type
text/x-php
Expires
Wed, Jun 12, 06:27 (2 d)
Engine
blob
Format
Raw Data
Handle
18216513
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