當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AccessibleObjectInterface::_set方法代碼示例

本文整理匯總了PHP中TYPO3\CMS\Core\Tests\AccessibleObjectInterface::_set方法的典型用法代碼示例。如果您正苦於以下問題:PHP AccessibleObjectInterface::_set方法的具體用法?PHP AccessibleObjectInterface::_set怎麽用?PHP AccessibleObjectInterface::_set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TYPO3\CMS\Core\Tests\AccessibleObjectInterface的用法示例。


在下文中一共展示了AccessibleObjectInterface::_set方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * Sets up this testcase
  */
 protected function setUp()
 {
     $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array());
     $this->backendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class, array('getTypoScriptSetup'));
     $this->mockTypoScriptService = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Service\TypoScriptService::class);
     $this->backendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
 }
開發者ID:rickymathew,項目名稱:TYPO3.CMS,代碼行數:10,代碼來源:BackendConfigurationManagerTest.php

示例2: addMockViewToFixture

 /**
  * Add a mock standalone view to fixture
  */
 protected function addMockViewToFixture()
 {
     $this->standaloneView = $this->getMock('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
     $this->request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request');
     $this->standaloneView->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
     $this->fixture->_set('view', $this->standaloneView);
 }
開發者ID:nicksergio,項目名稱:TYPO3v4-Core,代碼行數:10,代碼來源:FluidTemplateContentObjectTest.php

示例3: setUp

 /**
  * Sets up this testcase
  */
 public function setUp()
 {
     $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array());
     $this->backendConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager', array('getTypoScriptSetup'));
     $this->mockTypoScriptService = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
     $this->backendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
 }
開發者ID:khanhdeux,項目名稱:typo3test,代碼行數:10,代碼來源:BackendConfigurationManagerTest.php

示例4: setUp

 /**
  * Set up
  *
  * @return void
  */
 protected function setUp()
 {
     // Mock system under test to make protected methods accessible
     $this->configurationItemRepository = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ConfigurationItemRepository::class, array('dummy'));
     $this->injectedObjectManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class, array(), array(), '', FALSE);
     $this->configurationItemRepository->_set('objectManager', $this->injectedObjectManagerMock);
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:12,代碼來源:ConfigurationItemRepositoryTest.php

示例5: setUp

 /**
  * Set up
  */
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock('Tx_MooxNews_ViewHelpers_SimplePrevNextViewHelper', array('dummy'));
     $mockedDatabaseConnection = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTgetSingleRow'));
     $this->viewHelper->_set('databaseConnection', $mockedDatabaseConnection);
 }
開發者ID:preinboth,項目名稱:moox_news,代碼行數:10,代碼來源:SimplePrevNextViewHelperTest.php

示例6: setUp

 /**
  * Set up
  */
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock('GeorgRinger\\News\\ViewHelpers\\SimplePrevNextViewHelper', ['dummy']);
     $mockedDatabaseConnection = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', ['exec_SELECTgetSingleRow']);
     $this->viewHelper->_set('databaseConnection', $mockedDatabaseConnection);
 }
開發者ID:BastianBalthasarBux,項目名稱:news,代碼行數:10,代碼來源:SimplePrevNextViewHelperTest.php

示例7: persistSessionTokenWritesTokensToSession

 /**
  * @test
  */
 public function persistSessionTokenWritesTokensToSession()
 {
     $_SESSION['installToolFormToken'] = 'foo';
     $this->fixture->_set('sessionToken', '881ffea2159ac72182557b79dc0c723f5a8d20136f9fab56cdd4f8b3a1dbcfcd');
     $this->fixture->persistSessionToken();
     $this->assertEquals('881ffea2159ac72182557b79dc0c723f5a8d20136f9fab56cdd4f8b3a1dbcfcd', $_SESSION['installToolFormToken']);
 }
開發者ID:khanhdeux,項目名稱:typo3test,代碼行數:10,代碼來源:InstallToolFormProtectionTest.php

示例8: addMockViewToSubject

 /**
  * Add a mock standalone view to subject
  */
 protected function addMockViewToSubject()
 {
     $this->standaloneView = $this->getMock(\TYPO3\CMS\Fluid\View\StandaloneView::class, array(), array(), '', false);
     $this->request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
     $this->standaloneView->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
     $this->subject->_set('view', $this->standaloneView);
 }
開發者ID:graurus,項目名稱:testgit_t37,代碼行數:10,代碼來源:FluidTemplateContentObjectTest.php

示例9: renderReturnsString

 /**
  * Test for render()
  *
  * @param string $validation
  * @param string $expectedResult
  * @param bool $nativeValidationEnabled
  * @return void
  * @dataProvider renderReturnsStringDataProvider
  * @test
  */
 public function renderReturnsString($validation, $expectedResult, $nativeValidationEnabled)
 {
     $this->abstractValidationViewHelperMock->_set('settings', ['validation' => ['native' => $nativeValidationEnabled ? '1' : '0']]);
     $field = new Field();
     $field->setValidation($validation);
     $result = $this->abstractValidationViewHelperMock->_callRef('render', $field);
     $this->assertSame($expectedResult, $result);
 }
開發者ID:VladStawizki,項目名稱:ipl-logistik.de,代碼行數:18,代碼來源:FieldTypeFromValidationViewHelperTest.php

示例10: renderReturnsArray

 /**
  * Test for render()
  *
  * @param array $settings
  * @param array $additionalAttributes
  * @param array $expectedResult
  * @return void
  * @dataProvider renderReturnsArrayDataProvider
  * @test
  */
 public function renderReturnsArray($settings, $additionalAttributes, $expectedResult)
 {
     $form = new Form();
     $form->_setProperty('uid', 123);
     $this->enableParsleyAndAjaxViewHelperMock->_set('addRedirectUri', false);
     $this->enableParsleyAndAjaxViewHelperMock->_set('settings', $settings);
     $result = $this->enableParsleyAndAjaxViewHelperMock->_callRef('render', $form, $additionalAttributes);
     $this->assertSame($expectedResult, $result);
 }
開發者ID:VladStawizki,項目名稱:ipl-logistik.de,代碼行數:19,代碼來源:EnableParsleyAndAjaxViewHelperTest.php

示例11: renderReturnsArray

 /**
  * Test for render()
  *
  * @param array $settings
  * @param array $fieldProperties
  * @param array $additionalAttributes
  * @param array $expectedResult
  * @return void
  * @dataProvider renderReturnsArrayDataProvider
  * @test
  */
 public function renderReturnsArray($settings, $fieldProperties, $additionalAttributes, $expectedResult)
 {
     $field = new Field();
     foreach ($fieldProperties as $propertyName => $propertyValue) {
         $field->_setProperty($propertyName, $propertyValue);
     }
     $this->abstractValidationViewHelperMock->_set('settings', $settings);
     $result = $this->abstractValidationViewHelperMock->_callRef('render', $field, $additionalAttributes);
     $this->assertSame($expectedResult, $result);
 }
開發者ID:bernhardberger,項目名稱:powermail,代碼行數:21,代碼來源:UploadDataAttributeViewHelperTest.php

示例12: renderReturnsInt

 /**
  * Test for render()
  *
  * @param bool $extensionTableExists
  * @param bool $isNewerVersionAvailable
  * @param bool $currentVersionInExtensionTableExists
  * @param bool $isCurrentVersionUnsecure
  * @param int $expectedResult
  * @return void
  * @dataProvider renderReturnsIntDataProvider
  * @test
  */
 public function renderReturnsInt($extensionTableExists, $isNewerVersionAvailable, $currentVersionInExtensionTableExists, $isCurrentVersionUnsecure, $expectedResult)
 {
     $this->abstractValidationViewHelperMock->_set('checkFromDatabase', false);
     $this->abstractValidationViewHelperMock->_callRef('setExtensionTableExists', $extensionTableExists);
     $this->abstractValidationViewHelperMock->_callRef('setIsNewerVersionAvailable', $isNewerVersionAvailable);
     $this->abstractValidationViewHelperMock->_callRef('setCurrentVersionInExtensionTableExists', $currentVersionInExtensionTableExists);
     $this->abstractValidationViewHelperMock->_callRef('setIsCurrentVersionUnsecure', $isCurrentVersionUnsecure);
     $result = $this->abstractValidationViewHelperMock->_callRef('render');
     $this->assertSame($expectedResult, $result);
 }
開發者ID:VladStawizki,項目名稱:ipl-logistik.de,代碼行數:22,代碼來源:PowermailVersionNoteViewHelperTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     // Store all locale categories manipulated in tests for reconstruction in tearDown
     $this->backupLocales = array('LC_COLLATE' => setlocale(LC_COLLATE, 0), 'LC_CTYPE' => setlocale(LC_CTYPE, 0), 'LC_MONETARY' => setlocale(LC_MONETARY, 0), 'LC_TIME' => setlocale(LC_TIME, 0));
     $this->timezone = @date_default_timezone_get();
     $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] = 'Y-m-d';
     $this->subject = $this->getAccessibleMock(DateViewHelper::class, array('renderChildren'));
     /** @var RenderingContext $renderingContext */
     $renderingContext = $this->getMock(RenderingContext::class);
     $this->subject->_set('renderingContext', $renderingContext);
 }
開發者ID:vip3out,項目名稱:TYPO3.CMS,代碼行數:12,代碼來源:DateViewHelperTest.php

示例14: updateRootlineDataWithInvalidNewRootlineThrowsException

 /**
  * @test
  * @expectedException \RuntimeException
  */
 public function updateRootlineDataWithInvalidNewRootlineThrowsException()
 {
     $originalRootline = array(0 => array('uid' => 2, 'title' => 'originalTitle'), 1 => array('uid' => 3, 'title' => 'originalTitle2'));
     $newInvalidRootline = array(0 => array('uid' => 1, 'title' => 'newTitle'), 1 => array('uid' => 2, 'title' => 'newTitle2'));
     $this->templateServiceMock->_set('rootLine', $originalRootline);
     $this->templateServiceMock->updateRootlineData($newInvalidRootline);
 }
開發者ID:samuweiss,項目名稱:TYPO3-Site,代碼行數:11,代碼來源:TemplateServiceTest.php

示例15: setUp

 /**
  * Sets up this test case
  *
  * @return void
  */
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->view = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\StandaloneView::class, array('testFileExistence', 'buildParserConfiguration'), array(), '', FALSE);
     $this->mockTemplateParser = $this->getMock(TemplateParser::class);
     $this->mockParsedTemplate = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface::class);
     $this->mockTemplateParser->expects($this->any())->method('parse')->will($this->returnValue($this->mockParsedTemplate));
     $this->mockConfigurationManager = $this->getMock(ConfigurationManagerInterface::class);
     $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
     $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnCallback(array($this, 'objectManagerCallback')));
     $this->mockRequest = $this->getMock(Request::class);
     $this->mockUriBuilder = $this->getMock(UriBuilder::class);
     $this->mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
     $this->mockControllerContext = $this->getMock(ControllerContext::class);
     $this->mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->mockRequest));
     $this->mockViewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class);
     $this->mockRenderingContext = $this->getMock(RenderingContext::class);
     $this->mockRenderingContext->expects($this->any())->method('getControllerContext')->will($this->returnValue($this->mockControllerContext));
     $this->mockRenderingContext->expects($this->any())->method('getViewHelperVariableContainer')->will($this->returnValue($this->mockViewHelperVariableContainer));
     $this->view->_set('templateParser', $this->mockTemplateParser);
     $this->view->_set('objectManager', $this->mockObjectManager);
     $this->view->setRenderingContext($this->mockRenderingContext);
     $this->mockTemplateCompiler = $this->getMock(TemplateCompiler::class);
     $this->view->_set('templateCompiler', $this->mockTemplateCompiler);
     GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class, $this->mockObjectManager);
     GeneralUtility::addInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, $this->mockContentObject);
     $mockCacheManager = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class, array(), array(), '', FALSE);
     $mockCache = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::class, array(), array(), '', FALSE);
     $mockCacheManager->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
     GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Cache\CacheManager::class, $mockCacheManager);
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:36,代碼來源:StandaloneViewTest.php


注:本文中的TYPO3\CMS\Core\Tests\AccessibleObjectInterface::_set方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。