Raised DBAL version from 1.1.5 to 1.1.6
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Reflection / Service_testcase.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2009 Christopher Hlubek <hlubek@networkteam.com>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25 /**
26 * Some functional tests for the backport of the reflection service
27 */
28 class Tx_Extbase_Reflection_Service_testcase extends Tx_Extbase_BaseTestCase {
29
30 /**
31 * @param array $foo The foo parameter
32 * @return nothing
33 */
34 public function fixtureMethodForMethodTagsValues(array $foo) {
35
36 }
37
38 public function test_GetMethodTagsValues() {
39 $service = new Tx_Extbase_Reflection_Service();
40 $tagsValues = $service->getMethodTagsValues('Tx_Extbase_Reflection_Service_testcase', 'fixtureMethodForMethodTagsValues');
41
42 $this->assertEquals(array(
43 'param' => array('array $foo The foo parameter'),
44 'return' => array('nothing')
45 ), $tagsValues);
46 }
47
48 public function test_GetMethodParameters() {
49 $service = new Tx_Extbase_Reflection_Service();
50 $parameters = $service->getMethodParameters('Tx_Extbase_Reflection_Service_testcase', 'fixtureMethodForMethodTagsValues');
51
52 $this->assertEquals(array(
53 'foo' => array(
54 'position' => 0,
55 'byReference' => FALSE,
56 'array' => TRUE,
57 'optional' => FALSE,
58 'allowsNull' => FALSE,
59 'class' => NULL,
60 'type' => 'array'
61 )
62 ), $parameters);
63 }
64 }
65 ?>