本文整理汇总了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'));
}
示例2: acceptObjectStorageAsObjects
/**
* @test
*/
public function acceptObjectStorageAsObjects()
{
$objects = new ObjectStorage();
$this->controller->_set('objects', $objects);
$this->controller->indexAction();
$this->assertSame($objects, $this->controller->_get('objects'));
}
示例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);
}
示例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'));
}
示例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.');
}
示例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);
}
示例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']));
}
示例8: setDefaultsSetsDefaultsCorrectly
/**
* @test
*/
public function setDefaultsSetsDefaultsCorrectly()
{
$this->task->setDefaults(array('Foo'));
$this->assertSame(array('Foo'), $this->task->_get('defaults'));
}
示例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'));
}
示例10: flashMessageServiceInitiallyIsEmpty
/**
* @test
*/
public function flashMessageServiceInitiallyIsEmpty()
{
$this->assertSame(array(), $this->flashMessageService->_get('flashMessageQueues'));
}
示例11: constructCreatesInstanceOfFluidStandaloneView
/**
* @test
*/
public function constructCreatesInstanceOfFluidStandaloneView()
{
$this->assertInstanceOf('TYPO3\\CMS\\Fluid\\View\\StandaloneView', $this->fixture->_get('view'));
}
示例12: publicPropertyForAccessibleMockObjectIsDirectlyAccessible
/**
* @test
*/
public function publicPropertyForAccessibleMockObjectIsDirectlyAccessible()
{
self::assertSame('This is a public property.', $this->accessibleMock->_get('publicProperty'));
}
示例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'));
}
示例14: addLockingStrategyAddsTheClassNameToTheInternalArray
/**
* @test
*/
public function addLockingStrategyAddsTheClassNameToTheInternalArray()
{
$this->mockFactory->addLockingStrategy(DummyLock::class);
$this->assertArrayHasKey(DummyLock::class, $this->mockFactory->_get('lockingStrategy'));
}
示例15: appendContentAppendsContentCorrectly
/**
* @test
*/
public function appendContentAppendsContentCorrectly()
{
$this->mockResponse->_set('content', 'foo');
$this->mockResponse->appendContent('bar');
$this->assertSame('foobar', $this->mockResponse->_get('content'));
}