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


PHP PHPUnit_Framework_MockObject_MockObject::getConfiguration方法代码示例

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


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

示例1: configuration

 /**
  * @test
  */
 public function configuration()
 {
     $this->fixture->setConfiguration(['test' => 'test']);
     $this->assertEquals(['test' => 'test'], $this->fixture->getConfiguration());
     $this->fixture->addConfiguration('test2', 'test2');
     $this->assertEquals(['test' => 'test', 'test2' => 'test2'], $this->fixture->getConfiguration());
 }
开发者ID:sirdiego,项目名称:importr,代码行数:10,代码来源:AbstractResourceTest.php

示例2: testGetConfiguration

 /**
  * @covers ::setConfiguration
  * @covers ::getConfiguration
  */
 public function testGetConfiguration()
 {
     $configuration = array($this->randomMachineName() => mt_rand()) + $this->sut->defaultConfiguration();
     $return = $this->sut->setConfiguration($configuration);
     $this->assertNull($return);
     $this->assertSame($configuration, $this->sut->getConfiguration());
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:11,代码来源:PaymentLineItemBaseTest.php

示例3: setUp

 protected function setUp()
 {
     $metadataDriver = new AnnotationDriver(new AnnotationReader(), self::ENTITY_NAMESPACE);
     $this->emMock = $this->getTestEntityManager();
     $this->emMock->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->extendConfigProvider = $this->getExtendConfigMock();
 }
开发者ID:northdakota,项目名称:platform,代码行数:7,代码来源:EntityHierarchyProviderTest.php

示例4: testSetDefaultOptions

 public function testSetDefaultOptions()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\IntegrationBundle\\Tests\\Unit\\Fixture\\Entity');
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['OroIntegrationBundle' => 'Oro\\Bundle\\IntegrationBundle\\Tests\\Unit\\Fixture\\Entity']);
     $resolver = new OptionsResolver();
     $this->type->setDefaultOptions($resolver);
     $resolved = $resolver->resolve(['configs' => ['placeholder' => 'testPlaceholder'], 'allowed_types' => ['testType']]);
     $this->assertInstanceOf('Symfony\\Bridge\\Doctrine\\Form\\ChoiceList\\EntityChoiceList', $resolved['choice_list']);
 }
开发者ID:ramunasd,项目名称:platform,代码行数:11,代码来源:IntegrationSelectTypeTest.php

示例5: setUp

 public function setUp()
 {
     $this->contextRegistry = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Context\\ContextRegistry')->disableOriginalConstructor()->setMethods(array('getByStepExecution'))->getMock();
     $this->managerRegistry = $this->getMock('Doctrine\\Common\\Persistence\\ManagerRegistry');
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\IntegrationBundle\\Entity');
     $ownershipMetadataProvider = $this->getMockBuilder('Oro\\Bundle\\SecurityBundle\\Owner\\Metadata\\OwnershipMetadataProvider')->disableOriginalConstructor()->getMock();
     $this->em = $this->getTestEntityManager();
     $config = $this->em->getConfiguration();
     $config->setMetadataDriverImpl($metadataDriver);
     $config->setEntityNamespaces(['OroIntegrationBundle' => 'Oro\\Bundle\\IntegrationBundle\\Entity']);
     $this->reader = new EntityReaderById($this->contextRegistry, $this->managerRegistry, $ownershipMetadataProvider);
 }
开发者ID:Maksold,项目名称:platform,代码行数:13,代码来源:EntityReaderByIdTest.php

示例6: cachingOfActionsCanNotBeChanged

 /**
  * @test
  */
 public function cachingOfActionsCanNotBeChanged()
 {
     $configuration = array('extensionName' => 'CurrentExtensionName', 'pluginName' => 'CurrentPluginName', 'switchableControllerActions' => array('Controller1' => array('newAction', 'action1'), 'Controller2' => array('newAction2', 'action4', 'action5')));
     $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
     $this->abstractConfigurationManager->setConfiguration($configuration);
     $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
     $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
     $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(create_function('$a', 'return $a;')));
     $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
     $expectedResult = array('Controller1' => array('actions' => array('newAction', 'action1')), 'Controller2' => array('actions' => array('newAction2', 'action4', 'action5'), 'nonCacheableActions' => array('action4')));
     $actualResult = $mergedConfiguration['controllerConfiguration'];
     $this->assertEquals($expectedResult, $actualResult);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:16,代码来源:AbstractConfigurationManagerTest.php

示例7: testGetConfiguration

 /**
  * @covers ::setConfiguration
  * @covers ::getConfiguration
  */
 public function testGetConfiguration()
 {
     $configuration = ['foo' => $this->randomMachineName()];
     $this->assertNull($this->sut->setConfiguration($configuration));
     $this->assertSame($configuration, $this->sut->getConfiguration());
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:10,代码来源:PaymentTypeBaseTest.php

示例8: testGetConfiguration

 /**
  * @covers ::setConfiguration
  * @covers ::getConfiguration
  */
 public function testGetConfiguration()
 {
     $configuration = array($this->randomMachineName());
     $this->assertSame($this->sut, $this->sut->setConfiguration($configuration));
     $this->assertSame($configuration, $this->sut->getConfiguration());
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:10,代码来源:PluginSelectorBaseTest.php


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