本文整理汇总了PHP中OCP\AppFramework\Http\TemplateResponse::getStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP TemplateResponse::getStatus方法的具体用法?PHP TemplateResponse::getStatus怎么用?PHP TemplateResponse::getStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCP\AppFramework\Http\TemplateResponse
的用法示例。
在下文中一共展示了TemplateResponse::getStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testChainability
public function testChainability()
{
$params = array('hi' => 'yo');
$this->tpl->setParams($params)->setStatus(Http::STATUS_NOT_FOUND);
$this->assertEquals(Http::STATUS_NOT_FOUND, $this->tpl->getStatus());
$this->assertEquals(array('hi' => 'yo'), $this->tpl->getParams());
}
示例2: testPublicIndexWithFolderToken
public function testPublicIndexWithFolderToken()
{
$token = 'aaaabbbbccccdddd';
$password = 'I am a password';
$displayName = 'User X';
$albumName = 'My Shared Folder';
$protected = 'true';
$server2ServerSharing = true;
$server2ServerSharingEnabled = 'yes';
$params = ['appName' => $this->appName, 'token' => $token, 'displayName' => $displayName, 'albumName' => $albumName, 'server2ServerSharing' => $server2ServerSharing, 'protected' => $protected, 'filename' => $albumName];
$this->mockGetSharedNode('dir', 12345);
$this->mockGetSharedFolderName($albumName);
$this->mockGetDisplayName($displayName);
$this->mockGetSharePassword($password);
$this->mockGetAppValue($server2ServerSharingEnabled);
$template = new TemplateResponse($this->appName, 'public', $params, 'public');
$response = $this->controller->publicIndex($token, null);
$this->assertEquals($params, $response->getParams());
$this->assertEquals('public', $response->getTemplateName());
$this->assertTrue($response instanceof TemplateResponse);
$this->assertEquals($template->getStatus(), $response->getStatus());
}