本文整理汇总了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"]));
}