示例#1
0
    /**
     * Tests whether the 'checkModifyAccessList' hook modifies the $accessAllowed variable.
     *
     * @test
     */
    public function doesCheckModifyAccessListHookModifyAccessAllowed()
    {
        $hookClass = uniqid('tx_coretest');
        eval('
			class ' . $hookClass . ' implements \\TYPO3\\CMS\\Core\\DataHandling\\DataHandlerCheckModifyAccessListHookInterface {
				public function checkModifyAccessList(&$accessAllowed, $table, \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $parent) { $accessAllowed = TRUE; }
			}
		');
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = $hookClass;
        $this->assertTrue($this->subject->checkModifyAccessList('tt_content'));
    }
示例#2
0
 /**
  * Tests whether the 'checkModifyAccessList' hook modifies the $accessAllowed variable.
  *
  * @test
  */
 public function doesCheckModifyAccessListHookModifyAccessAllowed()
 {
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = AllowAccessHookFixture::class;
     $this->assertTrue($this->subject->checkModifyAccessList('tt_content'));
 }