@@ -32,7 +32,22 @@ public function testLintCorrectFile()
32
32
$ filename = $ this ->createFile ();
33
33
34
34
$ tester ->execute (
35
- array ('filename ' => $ filename ),
35
+ array ('filename ' => array ($ filename )),
36
+ array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false )
37
+ );
38
+
39
+ $ this ->assertEquals (0 , $ tester ->getStatusCode (), 'Returns 0 in case of success ' );
40
+ $ this ->assertContains ('OK ' , trim ($ tester ->getDisplay ()));
41
+ }
42
+
43
+ public function testLintCorrectFiles ()
44
+ {
45
+ $ tester = $ this ->createCommandTester ();
46
+ $ filename1 = $ this ->createFile ();
47
+ $ filename2 = $ this ->createFile ();
48
+
49
+ $ tester ->execute (
50
+ array ('filename ' => array ($ filename1 , $ filename2 )),
36
51
array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false )
37
52
);
38
53
@@ -49,7 +64,7 @@ public function testStrictFilenames($requireStrictFileNames, $fileNamePattern, $
49
64
$ filename = $ this ->createFile ('note ' , $ targetLanguage , $ fileNamePattern );
50
65
51
66
$ tester ->execute (
52
- array ('filename ' => $ filename ),
67
+ array ('filename ' => array ( $ filename) ),
53
68
array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false )
54
69
);
55
70
@@ -62,7 +77,7 @@ public function testLintIncorrectXmlSyntax()
62
77
$ tester = $ this ->createCommandTester ();
63
78
$ filename = $ this ->createFile ('note <target> ' );
64
79
65
- $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
80
+ $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
66
81
67
82
$ this ->assertEquals (1 , $ tester ->getStatusCode (), 'Returns 1 in case of error ' );
68
83
$ this ->assertContains ('Opening and ending tag mismatch: target line 6 and source ' , trim ($ tester ->getDisplay ()));
@@ -73,7 +88,7 @@ public function testLintIncorrectTargetLanguage()
73
88
$ tester = $ this ->createCommandTester ();
74
89
$ filename = $ this ->createFile ('note ' , 'es ' );
75
90
76
- $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
91
+ $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
77
92
78
93
$ this ->assertEquals (1 , $ tester ->getStatusCode (), 'Returns 1 in case of error ' );
79
94
$ this ->assertContains ('There is a mismatch between the language included in the file name ("messages.en.xlf") and the "es" value used in the "target-language" attribute of the file. ' , trim ($ tester ->getDisplay ()));
@@ -88,7 +103,7 @@ public function testLintFileNotReadable()
88
103
$ filename = $ this ->createFile ();
89
104
unlink ($ filename );
90
105
91
- $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
106
+ $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
92
107
}
93
108
94
109
public function testGetHelp ()
0 commit comments