@@ -31,7 +31,19 @@ public function testLintCorrectFile()
31
31
$ tester = $ this ->createCommandTester ();
32
32
$ filename = $ this ->createFile ('foo: bar ' );
33
33
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 ));
35
47
36
48
$ this ->assertEquals (0 , $ ret , 'Returns 0 in case of success ' );
37
49
$ this ->assertRegExp ('/^\/\/ OK in / ' , trim ($ tester ->getDisplay ()));
@@ -45,7 +57,7 @@ public function testLintIncorrectFile()
45
57
$ tester = $ this ->createCommandTester ();
46
58
$ filename = $ this ->createFile ($ incorrectContent );
47
59
48
- $ ret = $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
60
+ $ ret = $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
49
61
50
62
$ this ->assertEquals (1 , $ ret , 'Returns 1 in case of error ' );
51
63
$ this ->assertContains ('Unable to parse at line 3 (near "bar"). ' , trim ($ tester ->getDisplay ()));
@@ -56,7 +68,7 @@ public function testConstantAsKey()
56
68
$ yaml = <<<YAML
57
69
!php/const 'Symfony\Component\Yaml\Tests\Command\Foo::TEST': bar
58
70
YAML ;
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 ));
60
72
$ this ->assertSame (0 , $ ret , 'lint:yaml exits with code 0 in case of success ' );
61
73
}
62
74
@@ -65,7 +77,7 @@ public function testCustomTags()
65
77
$ yaml = <<<YAML
66
78
foo: !my_tag {foo: bar}
67
79
YAML ;
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 ));
69
81
$ this ->assertSame (0 , $ ret , 'lint:yaml exits with code 0 in case of success ' );
70
82
}
71
83
@@ -74,7 +86,7 @@ public function testCustomTagsError()
74
86
$ yaml = <<<YAML
75
87
foo: !my_tag {foo: bar}
76
88
YAML ;
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 ));
78
90
$ this ->assertSame (1 , $ ret , 'lint:yaml exits with code 1 in case of error ' );
79
91
}
80
92
@@ -87,7 +99,7 @@ public function testLintFileNotReadable()
87
99
$ filename = $ this ->createFile ('' );
88
100
unlink ($ filename );
89
101
90
- $ ret = $ tester ->execute (array ('filename ' => $ filename ), array ('decorated ' => false ));
102
+ $ tester ->execute (array ('filename ' => array ( $ filename) ), array ('decorated ' => false ));
91
103
}
92
104
93
105
/**
@@ -135,5 +147,5 @@ protected function tearDown()
135
147
136
148
class Foo
137
149
{
138
- const TEST = 'foo ' ;
150
+ public const TEST = 'foo ' ;
139
151
}
0 commit comments