/** * @return void */ public function setUp() { $this->testingFramework = new \Tx_Phpunit_Framework('fe_users'); $pageUid = $this->testingFramework->createFrontEndPage(); $this->testingFramework->createTemplate($pageUid, array('include_static_file' => 'EXT:sf_register/Configuration/TypoScript/maximal/')); $this->testingFramework->createFakeFrontEnd($pageUid); $this->fixture = $this->getAccessibleMock('Evoweb\\SfRegister\\Domain\\Validator\\EqualCurrentPasswordValidator', array('dummy')); }
/** * @return void */ public function setUp() { $this->testingFramework = new \Tx_Phpunit_Framework('fe_users'); $pageUid = $this->testingFramework->createFrontEndPage(); $this->testingFramework->createTemplate($pageUid, array('include_static_file' => 'EXT:sf_register/Configuration/TypoScript/')); $this->testingFramework->createFakeFrontEnd($pageUid); /** @var \Evoweb\SfRegister\Validation\Validator\UniqueValidator $fixture */ $this->fixture = $this->getAccessibleMock('Evoweb\\SfRegister\\Validation\\Validator\\UniqueValidator', array('dummy'), array('global' => FALSE)); }
/** * @return void */ public function setUp() { $this->testingFramework = new \Tx_Phpunit_Framework('fe_users'); $pageUid = $this->testingFramework->createFrontEndPage(); $this->testingFramework->createTemplate($pageUid, array('include_static_file' => 'EXT:sf_register/Configuration/TypoScript/maximal/')); $this->testingFramework->createFakeFrontEnd($pageUid); /** @var \Evoweb\SfRegister\Validation\Validator\BadWordValidator|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $fixture */ $fixture = $this->getAccessibleMock('Evoweb\\SfRegister\\Validation\\Validator\\BadWordValidator', array('dummy')); $fixture->_set('settings', $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_sfregister.']['settings.']); $this->fixture = $fixture; }
/** * @test */ public function createFakeFrontEndWithTemplateRecordMarksTemplateAsLoaded() { $pageUid = $this->fixture->createFrontEndPage(); $this->fixture->createTemplate($pageUid, array('config' => 'foo = 42')); $this->fixture->createFakeFrontEnd($pageUid); $this->assertSame(1, $GLOBALS['TSFE']->tmpl->loaded); }
/** * @return void */ public function setUp() { $this->testingFramework = new \Tx_Phpunit_Framework('fe_users'); $pageUid = $this->testingFramework->createFrontEndPage(); $this->testingFramework->createTemplate($pageUid, array('include_static_file' => 'EXT:sf_register/Configuration/TypoScript/')); $this->testingFramework->createFakeFrontEnd($pageUid); $extensionName = 'SfRegister'; $pluginName = 'Form'; $extensionSettings = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]; $extensionSettings['modules'][$pluginName]['controllers']['FeuserCreate'] = array('actions' => array('form', 'preview', 'proxy', 'save', 'confirm', 'removeImage'), 'nonCacheableActions' => array('form', 'preview', 'proxy', 'save', 'confirm', 'removeImage')); $bootstrap = new \TYPO3\CMS\Extbase\Core\Bootstrap(); $bootstrap->run('', array('userFunc' => '\\TYPO3\\CMS\\Extbase\\Core\\Bootstrap->run', 'extensionName' => $extensionName, 'pluginName' => $pluginName)); /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */ $objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class); $this->fixture = new \Evoweb\SfRegister\Domain\Repository\FrontendUserRepository($objectManager); }