Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99036268
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
Sat, Jan 18, 15:33
Size
657 B
Mime Type
text/x-php
Expires
Mon, Jan 20, 15:33 (2 d)
Engine
blob
Format
Raw Data
Handle
23695002
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