TYPO3 CMS  TYPO3_6-2
RelationHandlerTest.php
Go to the documentation of this file.
1 <?php
3 
21 
25  protected $fixture;
26 
30  public function setUp() {
31  $this->fixture = $this->getMock('TYPO3\\CMS\\Core\\Database\\RelationHandler', array('purgeVersionedIds', 'purgeLiveVersionedIds'));
32  }
33 
37  public function tearDown() {
38  unset($this->fixture);
39  }
40 
45  $GLOBALS['TCA']['sys_category']['ctrl']['versioningWS'] = FALSE;
46 
47  $this->fixture->tableArray = array(
48  'sys_category' => array(1, 2, 3),
49  );
50 
51  $this->assertFalse($this->fixture->purgeItemArray(0));
52  }
53 
58  $GLOBALS['TCA']['sys_category']['ctrl']['versioningWS'] = 2;
59 
60  $this->fixture->tableArray = array(
61  'sys_category' => array(1, 2, 3),
62  );
63 
64  $this->fixture->expects($this->once())
65  ->method('purgeVersionedIds')
66  ->with('sys_category', array(1, 2, 3))
67  ->will($this->returnValue(array(2)));
68 
69  $this->assertTrue($this->fixture->purgeItemArray(0));
70  }
71 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]