28 $this->fixture = new \TYPO3\CMS\Core\Tree\TableConfiguration\TreeDataProviderFactory();
31 $GLOBALS[
'TCA'][
'foo'][
'ctrl'] = array();
32 $GLOBALS[
'TCA'][
'foo'][
'ctrl'][
'label'] =
'labelFoo';
33 $GLOBALS[
'TCA'][
'foo'][
'columns'] = array();
41 'Empty Configuration' => array(array()),
42 'File Configuration' => array(array(
43 'internal_type' =>
'file',
44 'treeConfig' => array(),
46 'Unknown Type' => array(array(
47 'internal_type' =>
'foo',
48 'treeConfig' => array(),
50 'No foreign table' => array(array(
51 'internal_type' =>
'db',
52 'treeConfig' => array(),
54 'No tree configuration' => array(array(
55 'internal_type' =>
'db',
56 'foreign_table' =>
'foo',
58 'Tree configuration not array' => array(array(
59 'internal_type' =>
'db',
60 'foreign_table' =>
'foo',
61 'treeConfig' =>
'bar',
63 'Tree configuration missing childer and parent field' => array(array(
64 'internal_type' =>
'db',
65 'foreign_table' =>
'foo',
66 'treeConfig' => array(),
78 $this->fixture->getDataProvider($tcaConfiguration,
'foo',
'bar', array(
'uid' => 1));
85 $dataProviderMockClassName = $this->
getUniqueId(
'tx_coretest_tree_data_provider');
86 eval(
'class ' . $dataProviderMockClassName .
' { 87 function __construct($configuration) { 91 $tcaConfiguration = array(
'treeConfig' => array(
'dataProvider' => $dataProviderMockClassName),
'internal_type' =>
'foo');
92 $dataProvider = $this->fixture->getDataProvider($tcaConfiguration,
'foo',
'bar', array(
'uid' => 1));
94 $this->assertInstanceOf($dataProviderMockClassName, $dataProvider);
101 $dataProviderMockClassName = $this->
getUniqueId(
'tx_coretest_tree_data_provider');
102 $tcaConfiguration = array(
'treeConfig' => array(
'dataProvider' => $dataProviderMockClassName),
'internal_type' =>
'foo');
103 $classCode =
'class ' . $dataProviderMockClassName .
' { 104 function __construct($configuration) { 105 if (!is_array($configuration)) throw new Exception(\'Failed asserting that the contructor arguments are an array\'); 106 if ($configuration !== ' . var_export($tcaConfiguration, TRUE) .
') throw new Exception(\'Failed asserting that the contructor arguments are correctly passed\'); 110 $dataProvider = $this->fixture->getDataProvider($tcaConfiguration,
'foo',
'bar', array(
'uid' => 1));
112 $this->assertInstanceOf($dataProviderMockClassName, $dataProvider);
configuredDataProviderClassIsInstantiatedWithTcaConfigurationInConstructor()
factoryThrowsExceptionIfInvalidConfigurationIsGiven(array $tcaConfiguration)
invalidConfigurationDataProvider()
configuredDataProviderClassIsInstantiated()
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]