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


PHP ConfigurationManagerInterface::expects方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE);
     $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
     $this->mockConfigurationManager->expects($this->any())->method('getContentObject')->will($this->returnValue($this->mockContentObject));
     $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CropViewHelper', array('renderChildren'));
     $this->viewHelper->injectConfigurationManager($this->mockConfigurationManager);
     $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Content'));
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:10,代码来源:CropViewHelperTest.php

示例2: getTargetPidByPluginSignatureThrowsExceptionIfMoreThanOneTargetPidsWereFound

 /**
  * @test
  * @expectedException \TYPO3\CMS\Extbase\Exception
  */
 public function getTargetPidByPluginSignatureThrowsExceptionIfMoreThanOneTargetPidsWereFound()
 {
     $this->mockConfigurationManager->expects($this->once())->method('getConfiguration')->will($this->returnValue(array('view' => array('defaultPid' => 'auto'))));
     $GLOBALS['TSFE']->sys_page = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class, array('enableFields'));
     $GLOBALS['TSFE']->sys_page->expects($this->once())->method('enableFields')->will($this->returnValue(' AND enable_fields'));
     $GLOBALS['TYPO3_DB']->expects($this->once())->method('fullQuoteStr')->will($this->returnValue('"pluginSignature"'));
     $GLOBALS['TYPO3_DB']->expects($this->once())->method('exec_SELECTgetRows')->will($this->returnValue(array(array('pid' => 123), array('pid' => 124))));
     $this->extensionService->getTargetPidByPlugin('ExtensionName', 'SomePlugin');
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:13,代码来源:ExtensionServiceTest.php

示例3: buildThrowsPageNotFoundExceptionIfEnabledAndSpecifiedActionIsNotAllowed

 /**
  * @test
  * @expectedException \TYPO3\CMS\Core\Error\Http\PageNotFoundException
  */
 public function buildThrowsPageNotFoundExceptionIfEnabledAndSpecifiedActionIsNotAllowed()
 {
     $this->configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved'] = 1;
     $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
     $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
     $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
     $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
     $_GET = array('tx_myextension_pi1' => array('action' => 'someInvalidAction'));
     $this->requestBuilder->build();
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:14,代码来源:RequestBuilderTest.php

示例4: constructorCreatesContentObjectIfItIsNotSpecified

 /**
  * @test
  */
 public function constructorCreatesContentObjectIfItIsNotSpecified()
 {
     // FIXME should be compared with identicalTo() - but that does not seem to work
     $this->mockConfigurationManager->expects($this->once())->method('setContentObject')->with($this->equalTo($this->mockContentObject));
     new \TYPO3\CMS\Fluid\View\StandaloneView();
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:9,代码来源:StandaloneViewTest.php

示例5: constructorCreatesContentObjectIfItIsNotSpecified

 /**
  * @test
  */
 public function constructorCreatesContentObjectIfItIsNotSpecified()
 {
     $this->mockConfigurationManager->expects($this->once())->method('setContentObject')->with($this->identicalTo($this->mockContentObject));
     new StandaloneView();
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:8,代码来源:StandaloneViewTest.php

示例6: setUp

 /**
  * Sets up this test case
  *
  * @return void
  */
 public function setUp()
 {
     $this->configurationManager = $this->getMockBuilder(ConfigurationManager::class)->setMethods(['getConfiguration'])->getMock();
     $this->configurationManager->expects($this->once())->method('getConfiguration')->with($this->equalTo('Settings'))->will($this->returnValue(self::$settingsFixture));
     $this->sut = new Configuration($this->configurationManager);
 }
开发者ID:svenhartmann,项目名称:vantomas,代码行数:11,代码来源:ConfigurationTest.php


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