55a3d510b5cf9ec928092a70b81d366a42b0fc78
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Unit / Configuration / ConditionMatcherUserFuncs.php
1 <?php
2 /**
3 * This file is part of the TYPO3 CMS project.
4 *
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
8 *
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
11 *
12 * The TYPO3 project - inspiring people to share!
13 */
14
15 namespace {
16 function user_testFunctionWithSingleArgument() {
17 return count(func_get_args()) === 1;
18 }
19
20 function user_testFunctionWithThreeArguments() {
21 return count(func_get_args()) === 3;
22 }
23
24 function user_testFunctionWithThreeArgumentsSpaces() {
25 $result = TRUE;
26 foreach (func_get_args() as $argument) {
27 $result &= (trim($argument) == $argument);
28 }
29 return $result;
30 }
31
32 function user_testFunctionWithSpaces($value) {
33 return $value === ' 3, 4, 5, 6 ';
34 }
35
36 function user_testFunction() {
37 return TRUE;
38 }
39
40 function user_testFunctionFalse() {
41 return FALSE;
42 }
43
44 function user_testFunctionWithQuoteMissing($value) {
45 return $value === 'value "';
46 }
47
48 function user_testQuotes($value) {
49 return $value === '1 " 2';
50 }
51 }
52
53 ?>