當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。