[TASK] Fix CGL violations against ClassDocComment
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Tests / Unit / Utility / EmConfUtilityTest.php
1 <?php
2 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Utility;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2012
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26
27 /**
28 * EmConf utility test
29 *
30 * @package Extension Manager
31 * @subpackage Tests
32 */
33 class EmConfUtilityTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
34
35 /**
36 * Data Provider for construct em conf tests
37 *
38 * @return array
39 */
40 public function constructEmConfDataProvider() {
41 return array(
42 array(
43 array(
44 'extKey' => 'enetcache',
45 'EM_CONF' => array(
46 'title' => 'Plugin cache engine',
47 'description' => 'Provides an interface to cache plugin content elements based on 4.3 caching framework',
48 'category' => 'Frontend',
49 'shy' => 0,
50 'version' => '1.0.6',
51 'dependencies' => '',
52 'conflicts' => '',
53 'priority' => '',
54 'loadOrder' => '',
55 'TYPO3_version' => '4.3.0-0.0.0',
56 'PHP_version' => '',
57 'module' => '',
58 'state' => 'stable',
59 'uploadfolder' => 0,
60 'createDirs' => '',
61 'modify_tables' => '',
62 'clearcacheonload' => 0,
63 'lockType' => '',
64 'author' => 'Firstname Lastname',
65 'author_email' => 'test@example.com',
66 'author_company' => 'test',
67 'CGLcompliance' => NULL,
68 'CGLcompliance_note' => NULL
69 )
70 )
71 )
72 );
73 }
74
75 /**
76 * Tests whether the comment block is added
77 *
78 * @param array $extensionData
79 * @test
80 * @dataProvider constructEmConfDataProvider
81 * @return void
82 */
83 public function constructEmConfAddsCommentBlock(array $extensionData) {
84 $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\EmConfUtility', array('includeEmConf'));
85 $emConf = $fileHandlerMock->_call('constructEmConf', $extensionData);
86 $this->assertContains('Extension Manager/Repository config file for ext', $emConf);
87 }
88
89 }
90
91
92 ?>