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


PHP SessionInterface::reveal方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     $this->session = $this->prophesize(SessionInterface::class);
     $this->workspace = $this->prophesize(WorkspaceInterface::class);
     $this->queryManager = $this->prophesize(QueryManagerInterface::class);
     $this->dispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->phpcrQuery = $this->prophesize(QueryInterface::class);
     $this->phpcrResult = $this->prophesize(QueryResultInterface::class);
     $this->queryCreateEvent = $this->prophesize(QueryCreateEvent::class);
     $this->queryExecuteEvent = $this->prophesize(QueryExecuteEvent::class);
     $this->query = $this->prophesize(Query::class);
     $this->subscriber = new QuerySubscriber($this->session->reveal(), $this->dispatcher->reveal());
     $this->session->getWorkspace()->willReturn($this->workspace->reveal());
     $this->workspace->getQueryManager()->willReturn($this->queryManager->reveal());
 }
开发者ID:hason,项目名称:sulu-document-manager,代码行数:15,代码来源:QuerySubscriberTest.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->contentMapper = $this->prophesize('Sulu\\Component\\Content\\Mapper\\ContentMapperInterface');
     $this->requestAnalyzer = $this->prophesize('Sulu\\Component\\Webspace\\Analyzer\\RequestAnalyzerInterface');
     $this->contentTypeManager = $this->prophesize('Sulu\\Component\\Content\\ContentTypeManagerInterface');
     $this->structureManager = $this->prophesize('Sulu\\Component\\Content\\Compat\\StructureManagerInterface');
     $this->sessionManager = $this->prophesize('Sulu\\Component\\PHPCR\\SessionManager\\SessionManagerInterface');
     $this->session = $this->prophesize('PHPCR\\SessionInterface');
     $this->node = $this->prophesize('PHPCR\\NodeInterface');
     $this->parentNode = $this->prophesize('PHPCR\\NodeInterface');
     $this->startPageNode = $this->prophesize('PHPCR\\NodeInterface');
     $webspace = new Webspace();
     $webspace->setKey('sulu_test');
     $locale = new Localization();
     $locale->setCountry('us');
     $locale->setLanguage('en');
     $this->requestAnalyzer->getWebspace()->willReturn($webspace);
     $this->requestAnalyzer->getCurrentLocalization()->willReturn($locale);
     $this->contentTypeManager->get('text_line')->willReturn(new TextLine(''));
     $this->sessionManager->getSession()->willReturn($this->session->reveal());
     $this->sessionManager->getContentNode('sulu_test')->willReturn($this->startPageNode->reveal());
     $this->session->getNodeByIdentifier('123-123-123')->willReturn($this->node->reveal());
     $this->session->getNodeByIdentifier('321-321-321')->willReturn($this->parentNode->reveal());
     $this->node->getIdentifier()->willReturn('123-123-123');
     $this->node->getParent()->willReturn($this->parentNode->reveal());
     $this->node->getDepth()->willReturn(4);
     $this->parentNode->getIdentifier()->willReturn('321-321-321');
     $this->parentNode->getDepth()->willReturn(3);
     $this->startPageNode->getDepth()->willReturn(3);
     $this->structureResolver = new StructureResolver($this->contentTypeManager->reveal(), $this->structureManager->reveal());
 }
开发者ID:Silwereth,项目名称:sulu,代码行数:32,代码来源:ContentTwigExtensionTest.php


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