TYPO3 CMS  TYPO3_6-2
CaseContentObjectTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
23 
30 
34  protected $subject = NULL;
35 
39  public function setUp() {
41  $this->contentObjectRenderer = $this->getMock(
42  'TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer',
43  array('dummy')
44  );
45  $this->subject = $this->getAccessibleMock(
46  'TYPO3\\CMS\\Frontend\\ContentObject\\CaseContentObject',
47  array('dummy'),
48  array($this->contentObjectRenderer)
49  );
51  $tsfe = $this->getMock('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', array(), array(), '', FALSE);
52  $tsfe->tmpl = $this->getMock('TYPO3\\CMS\\Core\\TypoScript\\TemplateService');
53  $GLOBALS['TSFE'] = $tsfe;
54  }
55 
56 
61  $conf = array(
62  'key' => 'not existing'
63  );
64  $this->assertSame('', $this->subject->render($conf));
65  }
66 
71  $conf = array(
72  'key' => 'not existing',
73  'default' => 'TEXT',
74  'default.' => array(
75  'value' => 'expected value'
76  ),
77  );
78  $this->assertSame('expected value', $this->subject->render($conf));
79  }
80 }
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]