33 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6-
76namespace Magento \Framework \App \Test \Unit \DeploymentConfig \Writer ;
87
98use Magento \Framework \App \DeploymentConfig \Writer \PhpFormatter ;
@@ -12,8 +11,8 @@ class PhpFormatterTest extends \PHPUnit_Framework_TestCase
1211{
1312 /**
1413 * @dataProvider formatWithCommentDataProvider
15- * @param string|array $data
16- * @param array $comments
14+ * @param string[] $data
15+ * @param string[] $comments
1716 * @param string $expectedResult
1817 */
1918 public function testFormat ($ data , $ comments , $ expectedResult )
@@ -22,6 +21,9 @@ public function testFormat($data, $comments, $expectedResult)
2221 $ this ->assertEquals ($ expectedResult , $ formatter ->format ($ data , $ comments ));
2322 }
2423
24+ /**
25+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
26+ */
2527 public function formatWithCommentDataProvider ()
2628 {
2729 $ array = [
@@ -45,9 +47,9 @@ public function formatWithCommentDataProvider()
4547 ];
4648 $ comments1 = ['ns2 ' => 'comment for namespace 2 ' ];
4749 $ 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 ' ,
5153 'ns4 ' => 'comment for namespace 4 ' ,
5254 'ns5 ' => 'comment for unexisted namespace 5 ' ,
5355 ];
@@ -88,7 +90,7 @@ public function formatWithCommentDataProvider()
8890return array (
8991 /**
9092 * For the section: ns1
91- * comment for namespace 1
93+ * comment for' namespace 1
9294 */
9395 'ns1' =>
9496 array (
@@ -106,7 +108,7 @@ public function formatWithCommentDataProvider()
106108 /**
107109 * For the section: ns2
108110 * comment for namespace 2.
109- * Next comment for namespace 2
111+ * Next comment for' namespace 2
110112 */
111113 'ns2' =>
112114 array (
@@ -117,7 +119,7 @@ public function formatWithCommentDataProvider()
117119 ),
118120 /**
119121 * For the section: ns3
120- * comment for namespace 3
122+ * comment for" namespace 3
121123 */
122124 'ns3' => 'just text',
123125 /**
0 commit comments