本文整理汇总了PHP中Prophecy\Prophecy\ObjectProphecy::listShortUrls方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectProphecy::listShortUrls方法的具体用法?PHP ObjectProphecy::listShortUrls怎么用?PHP ObjectProphecy::listShortUrls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prophecy\Prophecy\ObjectProphecy
的用法示例。
在下文中一共展示了ObjectProphecy::listShortUrls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: anExceptionsReturnsErrorResponse
/**
* @test
*/
public function anExceptionsReturnsErrorResponse()
{
$page = 3;
$this->service->listShortUrls($page, null, [], null)->willThrow(\Exception::class)->shouldBeCalledTimes(1);
$response = $this->action->__invoke(ServerRequestFactory::fromGlobals()->withQueryParams(['page' => $page]), new Response());
$this->assertEquals(500, $response->getStatusCode());
}
示例2: ifTagsFlagIsProvidedTagsColumnIsIncluded
/**
* @test
*/
public function ifTagsFlagIsProvidedTagsColumnIsIncluded()
{
$this->questionHelper->setInputStream($this->getInputStream('\\n'));
$this->shortUrlService->listShortUrls(1, null, [], null)->willReturn(new Paginator(new ArrayAdapter()))->shouldBeCalledTimes(1);
$this->commandTester->execute(['command' => 'shortcode:list', '--showTags' => true]);
$output = $this->commandTester->getDisplay();
$this->assertTrue(strpos($output, 'Tags') > 0);
}