[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/conduit/call/__tests__/ -> ConduitCallTestCase.php (source)

   1  <?php
   2  
   3  final class ConduitCallTestCase extends PhabricatorTestCase {
   4  
   5    public function testConduitPing() {
   6      $call = new ConduitCall('conduit.ping', array());
   7      $call->setForceLocal(true);
   8      $result = $call->execute();
   9  
  10      $this->assertFalse(empty($result));
  11    }
  12  
  13    public function testConduitAuth() {
  14      $call = new ConduitCall('user.whoami', array(), true);
  15      $call->setForceLocal(true);
  16  
  17      $caught = null;
  18      try {
  19        $result = $call->execute();
  20      } catch (ConduitException $ex) {
  21        $caught = $ex;
  22      }
  23  
  24      $this->assertTrue(
  25        ($caught instanceof ConduitException),
  26        'user.whoami should require authentication');
  27    }
  28  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1