当前位置: 首页>>代码示例>>PHP>>正文


PHP ParseClient::HOST_NAME方法代码示例

本文整理汇总了PHP中Parse\ParseClient::HOST_NAME方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseClient::HOST_NAME方法的具体用法?PHP ParseClient::HOST_NAME怎么用?PHP ParseClient::HOST_NAME使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parse\ParseClient的用法示例。


在下文中一共展示了ParseClient::HOST_NAME方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testQuery

 public function testQuery()
 {
     $app_id = "XASVlMZE1IVe3zCDpHT5mzhTiEd3su7IWM68Uepa";
     $rest_key = "zBwmJIkcOE1dvX3GUIpJT5ebLOhhPhn1NmsdWC6e";
     $master_key = "0zNVL0uJnxUiU9r1Ogvii7vLW8tOASIyS5j5HK4G";
     ParseClient::$HOST_NAME = "http://localhost/parse/public/";
     ParseClient::initialize($app_id, $rest_key, $master_key);
     \App\Test::truncate();
     $response = $this->generalQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEmpty($response["results"]);
     $this->objects = factory(\App\Test::class, 50)->create();
     $response = $this->generalQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(50, count($response["results"]));
     $response = $this->firstQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(1, count($response["results"]));
     $response = $this->equalToQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(1, count($response["results"]));
     $response = $this->notEqualToQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(49, count($response["results"]));
     $response = $this->limitQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(10, count($response["results"]));
 }
开发者ID:nidalb,项目名称:baas,代码行数:28,代码来源:ExampleTest.php


注:本文中的Parse\ParseClient::HOST_NAME方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。