Skip to content

Commit d0d4184

Browse files
committed
Alternative
1 parent 64df255 commit d0d4184

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testLintFilesFromBundleDirectory()
6464
{
6565
$tester = $this->createCommandTester($this->getKernelAwareApplicationMock());
6666
$tester->execute(
67-
array('filename' => array('@AppBundle/Resources')),
67+
array('filename' => '@AppBundle/Resources'),
6868
array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)
6969
);
7070

src/Symfony/Component/Translation/Command/XliffLintCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function configure()
8080
protected function execute(InputInterface $input, OutputInterface $output)
8181
{
8282
$io = new SymfonyStyle($input, $output);
83-
$filenames = $input->getArgument('filename');
83+
$filenames = (array) $input->getArgument('filename');
8484
$this->format = $input->getOption('format');
8585
$this->displayCorrectFiles = $output->isVerbose();
8686

src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testLintCorrectFile()
3232
$filename = $this->createFile();
3333

3434
$tester->execute(
35-
array('filename' => array($filename)),
35+
array('filename' => $filename),
3636
array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)
3737
);
3838

@@ -64,7 +64,7 @@ public function testStrictFilenames($requireStrictFileNames, $fileNamePattern, $
6464
$filename = $this->createFile('note', $targetLanguage, $fileNamePattern);
6565

6666
$tester->execute(
67-
array('filename' => array($filename)),
67+
array('filename' => $filename),
6868
array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)
6969
);
7070

@@ -77,7 +77,7 @@ public function testLintIncorrectXmlSyntax()
7777
$tester = $this->createCommandTester();
7878
$filename = $this->createFile('note <target>');
7979

80-
$tester->execute(array('filename' => array($filename)), array('decorated' => false));
80+
$tester->execute(array('filename' => $filename), array('decorated' => false));
8181

8282
$this->assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error');
8383
$this->assertContains('Opening and ending tag mismatch: target line 6 and source', trim($tester->getDisplay()));
@@ -88,7 +88,7 @@ public function testLintIncorrectTargetLanguage()
8888
$tester = $this->createCommandTester();
8989
$filename = $this->createFile('note', 'es');
9090

91-
$tester->execute(array('filename' => array($filename)), array('decorated' => false));
91+
$tester->execute(array('filename' => $filename), array('decorated' => false));
9292

9393
$this->assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error');
9494
$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()));
@@ -103,7 +103,7 @@ public function testLintFileNotReadable()
103103
$filename = $this->createFile();
104104
unlink($filename);
105105

106-
$tester->execute(array('filename' => array($filename)), array('decorated' => false));
106+
$tester->execute(array('filename' => $filename), array('decorated' => false));
107107
}
108108

109109
public function testGetHelp()

0 commit comments

Comments
 (0)