Skip to content

Commit 91caa27

Browse files
author
EXT - THERAGE Kevin
committed
Fixing tests
1 parent 6784e1d commit 91caa27

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/Symfony/Component/Messenger/Command/StatsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6666
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
6767

6868
$transportNames = $this->transportNames;
69-
if ($input->getArgument('transportNames')) {
70-
$transportNames = $input->getArgument('transportNames');
69+
if ($input->getArgument('transport_names')) {
70+
$transportNames = $input->getArgument('transport_names');
7171
}
7272

7373
$outputTable = [];

src/Symfony/Component/Messenger/Tests/Command/StatsCommandTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,54 +68,54 @@ public function testWithoutArgument(): void
6868
$this->assertStringContainsString('[WARNING] The "unexisting" transport does not exist.', $display);
6969
$this->assertStringContainsString('message_countable 6', $display);
7070
$this->assertStringContainsString('another_message_countable 6', $display);
71-
$this->assertStringContainsString('! [NOTE] Unable to get message count from the following transports : "simple".', $display);
71+
$this->assertStringContainsString('! [NOTE] Unable to get message count for the following transports: "simple".', $display);
7272
}
7373

7474
public function testWithOneExistingMessageCountableTransport(): void
7575
{
7676
$tester = new CommandTester($this->command);
77-
$tester->execute(['transportNames' => ['message_countable']]);
77+
$tester->execute(['transport_names' => ['message_countable']]);
7878
$display = $tester->getDisplay();
7979

8080
$this->assertStringNotContainsString('[WARNING] The "unexisting" transport does not exist.', $display);
8181
$this->assertStringContainsString('message_countable 6', $display);
8282
$this->assertStringNotContainsString('another_message_countable', $display);
83-
$this->assertStringNotContainsString('! [NOTE] Unable to get message count from the following transports : "simple".', $display);
83+
$this->assertStringNotContainsString(' ! [NOTE] Unable to get message count for the following transports: "simple".', $display);
8484
}
8585

8686
public function testWithMultipleExistingMessageCountableTransport(): void
8787
{
8888
$tester = new CommandTester($this->command);
89-
$tester->execute(['transportNames' => ['message_countable', 'another_message_countable']]);
89+
$tester->execute(['transport_names' => ['message_countable', 'another_message_countable']]);
9090
$display = $tester->getDisplay();
9191

9292
$this->assertStringNotContainsString('[WARNING] The "unexisting" transport does not exist.', $display);
9393
$this->assertStringContainsString('message_countable 6', $display);
9494
$this->assertStringContainsString('another_message_countable 6', $display);
95-
$this->assertStringNotContainsString('! [NOTE] Unable to get message count from the following transports : "simple".', $display);
95+
$this->assertStringNotContainsString('! [NOTE] Unable to get message count for the following transports: "simple".', $display);
9696
}
9797

9898
public function testWithNotMessageCountableTransport(): void
9999
{
100100
$tester = new CommandTester($this->command);
101-
$tester->execute(['transportNames' => ['simple']]);
101+
$tester->execute(['transport_names' => ['simple']]);
102102
$display = $tester->getDisplay();
103103

104104
$this->assertStringNotContainsString('[WARNING] The "unexisting" transport does not exist.', $display);
105105
$this->assertStringNotContainsString('message_countable', $display);
106106
$this->assertStringNotContainsString('another_message_countable', $display);
107-
$this->assertStringContainsString('! [NOTE] Unable to get message count from the following transports : "simple".', $display);
107+
$this->assertStringContainsString('! [NOTE] Unable to get message count for the following transports: "simple".', $display);
108108
}
109109

110110
public function testWithNotExistingTransport(): void
111111
{
112112
$tester = new CommandTester($this->command);
113-
$tester->execute(['transportNames' => ['unexisting']]);
113+
$tester->execute(['transport_names' => ['unexisting']]);
114114
$display = $tester->getDisplay();
115115

116116
$this->assertStringContainsString('[WARNING] The "unexisting" transport does not exist.', $display);
117117
$this->assertStringNotContainsString('message_countable', $display);
118118
$this->assertStringNotContainsString('another_message_countable', $display);
119-
$this->assertStringNotContainsString('! [NOTE] Unable to get message count from the following transports : "simple".', $display);
119+
$this->assertStringNotContainsString('! [NOTE] Unable to get message count for the following transports: "simple".', $display);
120120
}
121121
}

0 commit comments

Comments
 (0)