3
3
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
-
7
6
namespace Magento \Framework \App \Test \Unit \DeploymentConfig \Writer ;
8
7
9
8
use Magento \Framework \App \DeploymentConfig \Writer \PhpFormatter ;
@@ -12,8 +11,8 @@ class PhpFormatterTest extends \PHPUnit_Framework_TestCase
12
11
{
13
12
/**
14
13
* @dataProvider formatWithCommentDataProvider
15
- * @param string|array $data
16
- * @param array $comments
14
+ * @param string[] $data
15
+ * @param string[] $comments
17
16
* @param string $expectedResult
18
17
*/
19
18
public function testFormat ($ data , $ comments , $ expectedResult )
@@ -22,6 +21,9 @@ public function testFormat($data, $comments, $expectedResult)
22
21
$ this ->assertEquals ($ expectedResult , $ formatter ->format ($ data , $ comments ));
23
22
}
24
23
24
+ /**
25
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
26
+ */
25
27
public function formatWithCommentDataProvider ()
26
28
{
27
29
$ array = [
@@ -45,9 +47,9 @@ public function formatWithCommentDataProvider()
45
47
];
46
48
$ comments1 = ['ns2 ' => 'comment for namespace 2 ' ];
47
49
$ comments2 = [
48
- 'ns1 ' => 'comment for namespace 1 ' ,
49
- 'ns2 ' => "comment for namespace 2. \nNext comment for namespace 2 " ,
50
- 'ns3 ' => 'comment for namespace 3 ' ,
50
+ 'ns1 ' => 'comment for \' namespace 1 ' ,
51
+ 'ns2 ' => "comment for namespace 2. \nNext comment for' namespace 2 " ,
52
+ 'ns3 ' => 'comment for" namespace 3 ' ,
51
53
'ns4 ' => 'comment for namespace 4 ' ,
52
54
'ns5 ' => 'comment for unexisted namespace 5 ' ,
53
55
];
@@ -88,7 +90,7 @@ public function formatWithCommentDataProvider()
88
90
return array (
89
91
/**
90
92
* For the section: ns1
91
- * comment for namespace 1
93
+ * comment for' namespace 1
92
94
*/
93
95
'ns1' =>
94
96
array (
@@ -106,7 +108,7 @@ public function formatWithCommentDataProvider()
106
108
/**
107
109
* For the section: ns2
108
110
* comment for namespace 2.
109
- * Next comment for namespace 2
111
+ * Next comment for' namespace 2
110
112
*/
111
113
'ns2' =>
112
114
array (
@@ -117,7 +119,7 @@ public function formatWithCommentDataProvider()
117
119
),
118
120
/**
119
121
* For the section: ns3
120
- * comment for namespace 3
122
+ * comment for" namespace 3
121
123
*/
122
124
'ns3' => 'just text',
123
125
/**
0 commit comments