@@ -31,7 +31,19 @@ public function testLintCorrectFile()
3131 $ tester = $ this ->createCommandTester ();
3232 $ filename = $ this ->createFile ('foo: bar ' );
3333
34- $ ret = $ tester ->execute (array ('filename ' => $ filename ), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
34+ $ ret = $ tester ->execute (array ('filename ' => array ($ filename )), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
35+
36+ $ this ->assertEquals (0 , $ ret , 'Returns 0 in case of success ' );
37+ $ this ->assertRegExp ('/^\/\/ OK in / ' , trim ($ tester ->getDisplay ()));
38+ }
39+
40+ public function testLintCorrectFiles ()
41+ {
42+ $ tester = $ this ->createCommandTester ();
43+ $ filename1 = $ this ->createFile ('foo: bar ' );
44+ $ filename2 = $ this ->createFile ('bar: baz ' );
45+
46+ $ ret = $ tester ->execute (array ('filename ' => array ($ filename1 , $ filename2 )), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
3547
3648 $ this ->assertEquals (0 , $ ret , 'Returns 0 in case of success ' );
3749 $ this ->assertRegExp ('/^\/\/ OK in / ' , trim ($ tester ->getDisplay ()));
@@ -45,7 +57,7 @@ public function testLintIncorrectFile()
4557 $ tester = $ this ->createCommandTester ();
4658 $ filename = $ this ->createFile ($ incorrectContent );
4759
48- $ ret = $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
60+ $ ret = $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
4961
5062 $ this ->assertEquals (1 , $ ret , 'Returns 1 in case of error ' );
5163 $ this ->assertContains ('Unable to parse at line 3 (near "bar"). ' , trim ($ tester ->getDisplay ()));
@@ -56,7 +68,7 @@ public function testConstantAsKey()
5668 $ yaml = <<<YAML
5769!php/const 'Symfony\Component\Yaml\Tests\Command\Foo::TEST': bar
5870YAML ;
59- $ ret = $ this ->createCommandTester ()->execute (array ('filename ' => $ this ->createFile ($ yaml )), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
71+ $ ret = $ this ->createCommandTester ()->execute (array ('filename ' => array ( $ this ->createFile ($ yaml) )), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
6072 $ this ->assertSame (0 , $ ret , 'lint:yaml exits with code 0 in case of success ' );
6173 }
6274
@@ -65,7 +77,7 @@ public function testCustomTags()
6577 $ yaml = <<<YAML
6678foo: !my_tag {foo: bar}
6779YAML ;
68- $ ret = $ this ->createCommandTester ()->execute (array ('filename ' => $ this ->createFile ($ yaml ), '--parse-tags ' => true ), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
80+ $ ret = $ this ->createCommandTester ()->execute (array ('filename ' => array ( $ this ->createFile ($ yaml) ), '--parse-tags ' => true ), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
6981 $ this ->assertSame (0 , $ ret , 'lint:yaml exits with code 0 in case of success ' );
7082 }
7183
@@ -74,7 +86,7 @@ public function testCustomTagsError()
7486 $ yaml = <<<YAML
7587foo: !my_tag {foo: bar}
7688YAML ;
77- $ ret = $ this ->createCommandTester ()->execute (array ('filename ' => $ this ->createFile ($ yaml )), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
89+ $ ret = $ this ->createCommandTester ()->execute (array ('filename ' => array ( $ this ->createFile ($ yaml) )), array ('verbosity ' => OutputInterface::VERBOSITY_VERBOSE , 'decorated ' => false ));
7890 $ this ->assertSame (1 , $ ret , 'lint:yaml exits with code 1 in case of error ' );
7991 }
8092
@@ -87,7 +99,7 @@ public function testLintFileNotReadable()
8799 $ filename = $ this ->createFile ('' );
88100 unlink ($ filename );
89101
90- $ ret = $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
102+ $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
91103 }
92104
93105 /**
@@ -135,5 +147,5 @@ protected function tearDown()
135147
136148class Foo
137149{
138- const TEST = 'foo ' ;
150+ public const TEST = 'foo ' ;
139151}
0 commit comments