TYPO3 CMS  TYPO3_6-2
EmConfUtilityTest.php
Go to the documentation of this file.
1 <?php
3 
21 
25  public function constructEmConfAddsCommentBlock() {
26  $extensionData = array(
27  'extKey' => 'key',
28  'EM_CONF' => array(),
29  );
30  $fixture = new \TYPO3\CMS\Extensionmanager\Utility\EmConfUtility();
31  $emConf = $fixture->constructEmConf($extensionData);
32  $this->assertContains('Extension Manager/Repository config file for ext', $emConf);
33  }
34 
39  $input = array(
40  'title' => 'a title',
41  'conflicts' => 'foo',
42  );
43  $expected = array(
44  'title' => 'a title',
45  'constraints' => array(
46  'depends' => array(),
47  'conflicts' => array(
48  'foo' => '',
49  ),
50  'suggests' => array(),
51  ),
52  );
53  $fixture = new \TYPO3\CMS\Extensionmanager\Utility\EmConfUtility();
54  $this->assertEquals($expected, $fixture->fixEmConf($input));
55  }
56 
61  $input = array(
62  'title' => 'a title',
63  'conflicts' => 'foo,bar',
64  );
65  $expected = array(
66  'title' => 'a title',
67  'constraints' => array(
68  'depends' => array(),
69  'conflicts' => array(
70  'foo' => '',
71  'bar' => '',
72  ),
73  'suggests' => array(),
74  ),
75  );
76  $fixture = new \TYPO3\CMS\Extensionmanager\Utility\EmConfUtility();
77  $this->assertEquals($expected, $fixture->fixEmConf($input));
78  }
79 }