本文整理汇总了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');
}
示例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());
}
示例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());
}
示例4: buildFakeObject
/**
* Builds a fake object using Prophecy
*/
public function buildFakeObject()
{
if (!isset($this->prophecy)) {
$this->initProphecy();
}
return $this->prophecy->reveal();
}
示例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());
}
示例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());
}
示例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'));
}
示例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());
}
示例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);
}
示例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());
}
示例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;
}
示例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());
}
示例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);
}
示例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);
}
示例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());
}