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


PHP PHPUnit_Framework_MockObject_MockObject::_get方法代码示例

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


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

示例1: processReenablesEscapingInterceptorOnClosingViewHelperTagIfItWasDisabledBefore

 /**
  * @test
  */
 public function processReenablesEscapingInterceptorOnClosingViewHelperTagIfItWasDisabledBefore()
 {
     $interceptorPosition = InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER;
     $this->mockViewHelper->expects($this->any())->method('isOutputEscapingEnabled')->will($this->returnValue(false));
     $this->mockNode->expects($this->any())->method('getUninitializedViewHelper')->will($this->returnValue($this->mockViewHelper));
     $this->escapeInterceptor->_set('childrenEscapingEnabled', false);
     $this->escapeInterceptor->_set('viewHelperNodesWhichDisableTheInterceptor', array($this->mockNode));
     $this->escapeInterceptor->process($this->mockNode, $interceptorPosition, $this->mockParsingState);
     $this->assertTrue($this->escapeInterceptor->_get('childrenEscapingEnabled'));
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:13,代码来源:EscapeTest.php

示例2: acceptObjectStorageAsObjects

 /**
  * @test
  */
 public function acceptObjectStorageAsObjects()
 {
     $objects = new ObjectStorage();
     $this->controller->_set('objects', $objects);
     $this->controller->indexAction();
     $this->assertSame($objects, $this->controller->_get('objects'));
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:10,代码来源:PaginateControllerTest.php

示例3: buildCorrectlySetsAllowedControllerActions

 /**
  * @test
  */
 public function buildCorrectlySetsAllowedControllerActions()
 {
     $this->injectDependencies();
     $expectedResult = array('TheFirstController' => array('show', 'index', 'new', 'create', 'delete', 'edit', 'update', 'setup', 'test'), 'TheSecondController' => array('show', 'index'), 'TheThirdController' => array('delete', 'create', 'onlyInThirdController'));
     $this->requestBuilder->build();
     $actualResult = $this->requestBuilder->_get('allowedControllerActions');
     $this->assertEquals($expectedResult, $actualResult);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:11,代码来源:RequestBuilderTest.php

示例4: updateRootlineDataOverwritesOwnArrayData

 /**
  * @test
  */
 public function updateRootlineDataOverwritesOwnArrayData()
 {
     $originalRootline = array(0 => array('uid' => 2, 'title' => 'originalTitle'), 1 => array('uid' => 3, 'title' => 'originalTitle2'));
     $updatedRootline = array(0 => array('uid' => 1, 'title' => 'newTitle'), 1 => array('uid' => 2, 'title' => 'newTitle2'), 2 => array('uid' => 3, 'title' => 'newTitle3'));
     $expectedRootline = array(0 => array('uid' => 2, 'title' => 'newTitle2'), 1 => array('uid' => 3, 'title' => 'newTitle3'));
     $this->templateServiceMock->_set('rootLine', $originalRootline);
     $this->templateServiceMock->updateRootlineData($updatedRootline);
     $this->assertEquals($expectedRootline, $this->templateServiceMock->_get('rootLine'));
 }
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:12,代码来源:TemplateServiceTest.php

示例5: compressCssFileContent

 /**
  * Tests optimizing a CSS asset group.
  *
  * @test
  * @dataProvider compressCssFileContentDataProvider
  * @param string $cssFile
  * @param string $expected
  */
 public function compressCssFileContent($cssFile, $expected)
 {
     $cssContent = file_get_contents($cssFile);
     $compressedCss = $this->subject->_call('compressCssString', $cssContent);
     // we have to fix relative paths, if we aren't working on a file in our target directory
     $relativeFilename = str_replace(PATH_site, '', $cssFile);
     if (strpos($relativeFilename, $this->subject->_get('targetDirectory')) === false) {
         $compressedCss = $this->subject->_call('cssFixRelativeUrlPaths', $compressedCss, dirname($relativeFilename) . '/');
     }
     $this->assertEquals(file_get_contents($expected), $compressedCss, 'Group of file CSS assets optimized correctly.');
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:19,代码来源:ResourceCompressorTest.php

示例6: getConfigurationStoresResultInConfigurationCache

 /**
  * @test
  */
 public function getConfigurationStoresResultInConfigurationCache()
 {
     $this->abstractConfigurationManager->_set('extensionName', 'CurrentExtensionName');
     $this->abstractConfigurationManager->_set('pluginName', 'CurrentPluginName');
     $this->abstractConfigurationManager->expects($this->any())->method('getPluginConfiguration')->will($this->returnValue(array('foo' => 'bar')));
     $this->abstractConfigurationManager->getConfiguration();
     $this->abstractConfigurationManager->getConfiguration('SomeOtherExtensionName', 'SomeOtherCurrentPluginName');
     $expectedResult = array('currentextensionname_currentpluginname', 'someotherextensionname_someothercurrentpluginname');
     $actualResult = array_keys($this->abstractConfigurationManager->_get('configurationCache'));
     $this->assertEquals($expectedResult, $actualResult);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:14,代码来源:AbstractConfigurationManagerTest.php

示例7: removeExtensionFromQueueRemovesExtension

 /**
  * @test
  * @return void
  */
 public function removeExtensionFromQueueRemovesExtension()
 {
     $extensionMock2 = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('dummy'));
     $extensionMock2->_set('extensionKey', 'foobarbaz');
     $extensionMock2->_set('version', '1.0.3');
     $this->downloadQueueMock->_set('extensionStorage', array('download' => array('foobar' => $this->extensionMock, 'foobarbaz' => $extensionMock2)));
     $extensionStorageBefore = $this->downloadQueueMock->_get('extensionStorage');
     $this->assertTrue(array_key_exists('foobar', $extensionStorageBefore['download']));
     $this->downloadQueueMock->removeExtensionFromQueue($this->extensionMock);
     $extensionStorageAfter = $this->downloadQueueMock->_get('extensionStorage');
     $this->assertFalse(array_key_exists('foobar', $extensionStorageAfter['download']));
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:16,代码来源:DownloadQueueTest.php

示例8: setDefaultsSetsDefaultsCorrectly

 /**
  * @test
  */
 public function setDefaultsSetsDefaultsCorrectly()
 {
     $this->task->setDefaults(array('Foo'));
     $this->assertSame(array('Foo'), $this->task->_get('defaults'));
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:8,代码来源:TaskTest.php

示例9: stdWrap_addPageCacheTagsAddsPageTags

 /**
  * @param array $expectedTags
  * @param array $configuration
  * @test
  * @dataProvider stdWrap_addPageCacheTagsAddsPageTagsDataProvider
  */
 public function stdWrap_addPageCacheTagsAddsPageTags(array $expectedTags, array $configuration)
 {
     $this->subject->stdWrap_addPageCacheTags('', $configuration);
     $this->assertEquals($expectedTags, $this->typoScriptFrontendControllerMock->_get('pageCacheTags'));
 }
开发者ID:TYPO3Incubator,项目名称:TYPO3.CMS,代码行数:11,代码来源:ContentObjectRendererTest.php

示例10: flashMessageServiceInitiallyIsEmpty

 /**
  * @test
  */
 public function flashMessageServiceInitiallyIsEmpty()
 {
     $this->assertSame(array(), $this->flashMessageService->_get('flashMessageQueues'));
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:7,代码来源:FlashMessageServiceTest.php

示例11: constructCreatesInstanceOfFluidStandaloneView

 /**
  * @test
  */
 public function constructCreatesInstanceOfFluidStandaloneView()
 {
     $this->assertInstanceOf('TYPO3\\CMS\\Fluid\\View\\StandaloneView', $this->fixture->_get('view'));
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:7,代码来源:FluidTemplateContentObjectTest.php

示例12: publicPropertyForAccessibleMockObjectIsDirectlyAccessible

 /**
  * @test
  */
 public function publicPropertyForAccessibleMockObjectIsDirectlyAccessible()
 {
     self::assertSame('This is a public property.', $this->accessibleMock->_get('publicProperty'));
 }
开发者ID:TrueType,项目名称:phpunit,代码行数:7,代码来源:TestCaseTest.php

示例13: stdWrap_addPageCacheTagsAddsPageTags

 /**
  * @param array $expectedTags
  * @param array $configuration
  * @test
  * @dataProvider stdWrap_addPageCacheTagsAddsPageTagsDataProvider
  */
 public function stdWrap_addPageCacheTagsAddsPageTags(array $expectedTags, array $configuration)
 {
     $this->cObj->stdWrap_addPageCacheTags('', $configuration);
     $this->assertEquals($expectedTags, $this->tsfe->_get('pageCacheTags'));
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:11,代码来源:ContentObjectRendererTest.php

示例14: addLockingStrategyAddsTheClassNameToTheInternalArray

 /**
  * @test
  */
 public function addLockingStrategyAddsTheClassNameToTheInternalArray()
 {
     $this->mockFactory->addLockingStrategy(DummyLock::class);
     $this->assertArrayHasKey(DummyLock::class, $this->mockFactory->_get('lockingStrategy'));
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:8,代码来源:LockFactoryTest.php

示例15: appendContentAppendsContentCorrectly

 /**
  * @test
  */
 public function appendContentAppendsContentCorrectly()
 {
     $this->mockResponse->_set('content', 'foo');
     $this->mockResponse->appendContent('bar');
     $this->assertSame('foobar', $this->mockResponse->_get('content'));
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:9,代码来源:ResponseTest.php


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