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


PHP Argument::Type方法代码示例

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


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

示例1: InsertProperties

 function it_inserts_properties(File $file, Property $property, InsertPropertyHandler $insertPropertyHandler)
 {
     $properties = [$property->getWrappedObject()];
     $insertProperties = new InsertProperties($file->getWrappedObject(), $properties);
     $insertProperty = Argument::Type(InsertProperty::class);
     $insertPropertyHandler->handle($insertProperty)->shouldBeCalled();
     $this->handle($insertProperties);
 }
开发者ID:memio,项目名称:spec-gen,代码行数:8,代码来源:InsertPropertiesHandlerSpec.php

示例2: it_should_not_create_pdf_document_already_created

 public function it_should_not_create_pdf_document_already_created(PdfDocument $doc)
 {
     $this->intent->getPaymentMethod()->willReturn(SepaOfflinePaymentMethod::ID);
     $this->event->getDocument()->willReturn($doc);
     $this->event->setDocument(Argument::Type('ZendPdf\\PdfDocument'))->shouldNotBeCalled();
     $this->event->stopPropagation()->shouldNotBeCalled();
     $this->generate($this->event);
 }
开发者ID:bco-trey,项目名称:edonate,代码行数:8,代码来源:GenerateSepaPdfListenerSpec.php

示例3: InsertUseStatements

 function it_does_not_insert_the_same_use_statement_twice(Editor $editor, File $file, FullyQualifiedName $fullyQualifiedName, InsertUseStatementHandler $insertUseStatementHandler)
 {
     $fullyQualifiedNames = [$fullyQualifiedName->getWrappedObject()];
     $insertUseStatements = new InsertUseStatements($file->getWrappedObject(), $fullyQualifiedNames);
     $fullyQualifiedName->getFullyQualifiedName()->willReturn('Vendor\\Project\\MyDependency');
     $editor->hasBelow($file, '/^use Vendor\\\\Project\\\\MyDependency;$/', 0)->willReturn(true);
     $insertUseStatement = Argument::Type(InsertUseStatement::class);
     $insertUseStatementHandler->handle($insertUseStatement)->shouldNotBeCalled();
     $this->handle($insertUseStatements);
 }
开发者ID:memio,项目名称:spec-gen,代码行数:10,代码来源:InsertUseStatementsHandlerSpec.php

示例4: testSendException

 public function testSendException()
 {
     if (!class_exists('\\HipChat\\HipChat')) {
         $this->markTestSkipped('The HipChat bundle is not installed.');
     }
     $hipchatMock = $this->prophesize('\\HipChat\\HipChat');
     $hipchatMock->message_room(Argument::Type('string'), Argument::Type('string'), Argument::Type('string'), Argument::Type('bool'), Argument::Type('string'))->willThrow(new \HipChat\HipChat_Exception('400', 'Curl Error', 'http://api.hipchat.com/room'))->shouldBeCalled();
     $hipchatNotifier = new HipchatNotifier($hipchatMock->reveal(), new NullLogger(), 'room', 'Hogosha Bot');
     $this->assertFalse($hipchatNotifier->send('my message', array('color' => 'yellow')));
 }
开发者ID:hogosha,项目名称:hogosha,代码行数:10,代码来源:HipchatNotifierTest.php

示例5: foreach

 function it_gets_available_updates($client)
 {
     $fakeResponse = '{"_items":{"core":[{"version":"0.2.1","changelog":["commit1"]},{"version":"0.2.0"}]}}';
     $client->call(Argument::Any(), Argument::Type('array'))->willReturn($fakeResponse);
     $result = $this->getAvailableUpdates();
     $result->shouldHaveCount(1);
     $result->shouldBeArray();
     foreach ($result['core'] as $package) {
         $package->shouldHaveType('SWP\\UpdaterBundle\\Model\\UpdatePackage');
     }
 }
开发者ID:ahilles107,项目名称:SWPUpdaterBundle,代码行数:11,代码来源:UpdateManagerSpec.php


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