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


PHP ObjectProphecy::reveal方法代码示例

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


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

示例1: setupAdapter

 /**
  * @before
  */
 public function setupAdapter()
 {
     $this->prophecy = $this->prophesize('League\\Flysystem\\AdapterInterface');
     $this->adapter = $this->prophecy->reveal();
     $this->filesystem = new Filesystem($this->adapter);
     $this->config = Argument::type('League\\Flysystem\\Config');
 }
开发者ID:mechiko,项目名称:staff-october,代码行数:10,代码来源:FilesystemTests.php

示例2: setUp

 public function setUp()
 {
     $this->em = $this->prophesize(EntityManagerInterface::class);
     $this->em->persist(Argument::any())->willReturn(null);
     $this->em->flush()->willReturn(null);
     $this->service = new ShortUrlService($this->em->reveal());
 }
开发者ID:shlinkio,项目名称:shlink,代码行数:7,代码来源:ShortUrlServiceTest.php

示例3: setUp

 /**
  * @{inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->repository = $this->prophesize('AppBundle\\Repository\\EntityRepositoryInterface');
     $this->managerRegistry = $this->prophesize('Doctrine\\Common\\Persistence\\ManagerRegistry');
     $this->manager = new ObjectManager($this->repository->reveal(), $this->managerRegistry->reveal());
 }
开发者ID:JahHub,项目名称:fertilizer,代码行数:10,代码来源:ObjectManagerTest.php

示例4: buildFakeObject

 /**
  * Builds a fake object using Prophecy
  */
 public function buildFakeObject()
 {
     if (!isset($this->prophecy)) {
         $this->initProphecy();
     }
     return $this->prophecy->reveal();
 }
开发者ID:mattjmattj,项目名称:maybe,代码行数:10,代码来源:Maybe.php

示例5: setUp

 protected function setUp()
 {
     $this->cache = $this->prophesize(Cache::class);
     $this->repository = $this->prophesize(DataboxRepository::class);
     $this->factory = $this->prophesize(DataboxFactory::class);
     $this->sut = new CachingDataboxRepositoryDecorator($this->repository->reveal(), $this->cache->reveal(), $this->cacheKey, $this->factory->reveal());
 }
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:7,代码来源:CachedDataboxRepositoryTest.php

示例6: setUp

 public function setUp()
 {
     $this->urlShortener = $this->prophesize(UrlShortener::class);
     $visitTracker = $this->prophesize(VisitsTracker::class);
     $visitTracker->track(Argument::any());
     $this->action = new RedirectAction($this->urlShortener->reveal(), $visitTracker->reveal());
 }
开发者ID:shlinkio,项目名称:shlink,代码行数:7,代码来源:RedirectActionTest.php

示例7: testInvokesSignatureVerifier

 public function testInvokesSignatureVerifier()
 {
     $expected = new GnupgVerificationResult(['fingerprint' => 'foobar', 'summary' => 'baz']);
     $this->verifier->verify('foo', 'bar')->willReturn($expected);
     $service = new SignatureService($this->verifier->reveal());
     $this->assertEquals($expected, $service->verify('foo', 'bar'));
 }
开发者ID:paul-schulleri,项目名称:phive,代码行数:7,代码来源:SignatureServiceTest.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->decoderMock = $this->createDecoderMock();
     $this->encoderMock = $this->createEncoderMock();
     $this->transcoder = new Transcoder($this->decoderMock->reveal(), $this->encoderMock->reveal());
 }
开发者ID:brainbits,项目名称:transcoder,代码行数:7,代码来源:TranscoderTest.php

示例9: testGetTemplateFilename

 public function testGetTemplateFilename()
 {
     $config = new SkelCommandConfig($this->cliOptionsProphecy->reveal(), '/tmp/');
     $expected = realpath(__DIR__ . '/../../../../conf/phive.skeleton.xml');
     $actual = realpath($config->getTemplateFilename());
     $this->assertEquals($expected, $actual);
 }
开发者ID:paul-schulleri,项目名称:phive,代码行数:7,代码来源:SkelCommandConfigTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->repositoryConnector = $this->prophesize('ConsoleHelpers\\SVNBuddy\\Repository\\Connector\\Connector');
     $this->commandConfig = $this->prophesize('\\ConsoleHelpers\\SVNBuddy\\Config\\CommandConfig');
     $this->workingCopyConflictTracker = new WorkingCopyConflictTracker($this->repositoryConnector->reveal(), $this->commandConfig->reveal());
 }
开发者ID:console-helpers,项目名称:svn-buddy,代码行数:7,代码来源:WorkingCopyConflictTrackerTest.php

示例11: setUp

 protected function setUp()
 {
     $this->subject = new DatabaseUserPermissionCheck();
     $this->beUserProphecy = $this->prophesize(BackendUserAuthentication::class);
     $GLOBALS['BE_USER'] = $this->beUserProphecy->reveal();
     $GLOBALS['BE_USER']->user['uid'] = 42;
 }
开发者ID:graurus,项目名称:testgit_t37,代码行数:7,代码来源:DatabaseUserPermissionCheckTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     /** @var LoggerInterface|ObjectProphecy $logger */
     $this->logger = $this->prophesize("\\Psr\\Log\\LoggerInterface");
     /** @var EventDispatcher|ObjectProphecy $eventDispatcher */
     $this->eventDispatcher = $this->prophesize("\\Symfony\\Component\\EventDispatcher\\EventDispatcher");
     /** @var MiraklApiInterface|ObjectProphecy mirakl */
     $this->mirakl = $this->prophesize("\\HiPay\\Wallet\\Mirakl\\Api\\Mirakl\\ApiInterface");
     /** @var HiPayApiInterface|ObjectProphecy $hipay */
     $this->hipay = $this->prophesize("\\HiPay\\Wallet\\Mirakl\\Api\\HiPay\\ApiInterface");
     $this->apiFactory = $this->prophesize("\\HiPay\\Wallet\\Mirakl\\Api\\Factory");
     $this->apiFactory->getHiPay()->willReturn($this->hipay->reveal());
     $this->apiFactory->getMirakl()->willReturn($this->mirakl->reveal());
     /** @var VendorManagerInterface|ObjectProphecy $vendorManager */
     $this->vendorManager = $this->prophesize("HiPay\\Wallet\\Mirakl\\Vendor\\Model\\VendorManagerInterface");
     /** @var DocumentManagerInterface|ObjectProphecy $documentManager */
     $this->documentManager = $this->prophesize("HiPay\\Wallet\\Mirakl\\Vendor\\Model\\DocumentManagerInterface");
     /** @var OperationManagerInterface|ObjectProphecy $operationManager */
     $this->operationManager = $this->prophesize("\\HiPay\\Wallet\\Mirakl\\Cashout\\Model\\Operation\\ManagerInterface");
     /** @var ValidatorInterface|ObjectProphecy $transactionValidator */
     $this->transactionValidator = $this->prophesize("\\HiPay\\Wallet\\Mirakl\\Cashout\\Model\\Transaction\\ValidatorInterface");
     $this->operator = new Vendor("operator@test.com", rand());
     $this->technical = new Vendor("technical@test.com", rand());
 }
开发者ID:hipay,项目名称:hipay-wallet-cashout-mirakl-library,代码行数:25,代码来源:AbstractProcessorTest.php

示例13: setUp

 /**
  * Create a new database connection mock object for every test.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->typoScriptFrontendController = $this->prophesize(TypoScriptFrontendController::class);
     $GLOBALS['TSFE'] = $this->typoScriptFrontendController->reveal();
     $this->subject = GeneralUtility::makeInstance(QueryContext::class);
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:12,代码来源:QueryContextTest.php

示例14: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->entityStorage = $this->prophesize(EntityStorageInterface::class);
     $this->requestHandler = new RequestHandler($this->entityStorage->reveal());
     $this->requestHandler->setContainer($this->container);
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:10,代码来源:RequestHandlerTest.php

示例15: setUp

 public function setUp()
 {
     $this->eventRepository = $this->prophesize('AppBundle\\Entity\\EventRepository');
     $this->context = $this->prophesize('Symfony\\Component\\Validator\\Context\\ExecutionContextInterface');
     $this->validator = new UniqueEventValidator($this->eventRepository->reveal());
     $this->validator->initialize($this->context->reveal());
 }
开发者ID:jlekowski,项目名称:battleships-api,代码行数:7,代码来源:UniqueEventValidatorTest.php


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