[TASK] Extension Manager: Remove superfluous tests
[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 * Testcase for the Tx_Extensionmanager_Utility_EmConf class in the TYPO3 Core.
28 *
29 * @package Extension Manager
30 * @subpackage Tests
31 */
32 class EmConfUtilityTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
33
34 /**
35 * Data Provider for construct em conf tests
36 *
37 * @return array
38 */
39 public function constructEmConfDataProvider() {
40 return array(
41 array(
42 array(
43 'extKey' => 'enetcache',
44 'EM_CONF' => array(
45 'title' => 'Plugin cache engine',
46 'description' => 'Provides an interface to cache plugin content elements based on 4.3 caching framework',
47 'category' => 'Frontend',
48 'shy' => 0,
49 'version' => '1.0.6',
50 'dependencies' => '',
51 'conflicts' => '',
52 'priority' => '',
53 'loadOrder' => '',
54 'TYPO3_version' => '4.3.0-0.0.0',
55 'PHP_version' => '',
56 'module' => '',
57 'state' => 'stable',
58 'uploadfolder' => 0,
59 'createDirs' => '',
60 'modify_tables' => '',
61 'clearcacheonload' => 0,
62 'lockType' => '',
63 'author' => 'Firstname Lastname',
64 'author_email' => 'test@example.com',
65 'author_company' => 'test',
66 'CGLcompliance' => NULL,
67 'CGLcompliance_note' => NULL
68 )
69 )
70 )
71 );
72 }
73
74 /**
75 * Tests whether the comment block is added
76 *
77 * @param array $extensionData
78 * @test
79 * @dataProvider constructEmConfDataProvider
80 * @return void
81 */
82 public function constructEmConfAddsCommentBlock(array $extensionData) {
83 $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\EmConfUtility', array('includeEmConf'));
84 $emConf = $fileHandlerMock->_call('constructEmConf', $extensionData);
85 $this->assertContains('Extension Manager/Repository config file for ext', $emConf);
86 }
87
88 }
89
90
91 ?>