Skip to content

Commit 8b66faa

Browse files
committed
Fix service injection at argument 3 for AutoClosingCommand::__construct()
1 parent 352c083 commit 8b66faa

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

Resources/config/services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282
arguments:
8383
- '@hackzilla_ticket.ticket_manager'
8484
- '@hackzilla_ticket.user_manager'
85-
- '@doctrine'
85+
- '@doctrine.orm.entity_manager'
8686
- '@translator'
8787
# BC: Replace 5th argument with "@parameter_bag" after bumping "symfony/dependency-injection" to "^4.1"
8888
- '@service_container'
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace Hackzilla\Bundle\TicketBundle\Tests\Functional\Command;
4+
5+
use Hackzilla\Bundle\TicketBundle\Tests\Functional\WebTestCase;
6+
use Symfony\Bundle\FrameworkBundle\Console\Application;
7+
use Symfony\Component\Console\Command\Command;
8+
9+
/**
10+
* @author Javier Spagnoletti <phansys@gmail.com>
11+
*/
12+
class ApplicationTest extends WebTestCase
13+
{
14+
/**
15+
* @dataProvider getCommands
16+
*
17+
* @param string $commandName
18+
*/
19+
public function testCommandRegistration($commandName)
20+
{
21+
$this->markTestSkipped('"friendsofsymfony/user-bundle" must be installed in order to run this test');
22+
23+
$application = new Application(static::$kernel);
24+
25+
$this->assertInstanceOf(Command::class, $application->find($commandName));
26+
}
27+
28+
public function getCommands()
29+
{
30+
return [
31+
['ticket:autoclosing'],
32+
['ticket:create'],
33+
];
34+
}
35+
}

0 commit comments

Comments
 (0)