Skip to content

Commit 383ef3e

Browse files
committed
add template linter to command test
1 parent 40a3805 commit 383ef3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/Command/MakerCommandTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Bundle\MakerBundle\FileManager;
1919
use Symfony\Bundle\MakerBundle\Generator;
2020
use Symfony\Bundle\MakerBundle\MakerInterface;
21+
use Symfony\Bundle\MakerBundle\Util\TemplateLinter;
2122
use Symfony\Component\Console\Tester\CommandTester;
2223

2324
class MakerCommandTest extends TestCase
@@ -39,7 +40,7 @@ public function testExceptionOnMissingDependencies(): void
3940

4041
$fileManager = $this->createMock(FileManager::class);
4142

42-
$command = new MakerCommand($maker, $fileManager, new Generator($fileManager, 'App'));
43+
$command = new MakerCommand($maker, $fileManager, new Generator($fileManager, 'App'), new TemplateLinter());
4344
// needed because it's normally set by the Application
4445
$command->setName('make:foo');
4546
$tester = new CommandTester($command);
@@ -52,7 +53,7 @@ public function testExceptionOnUnknownRootNamespace(): void
5253

5354
$fileManager = $this->createMock(FileManager::class);
5455

55-
$command = new MakerCommand($maker, $fileManager, new Generator($fileManager, 'Unknown'));
56+
$command = new MakerCommand($maker, $fileManager, new Generator($fileManager, 'Unknown'), new TemplateLinter());
5657
// needed because it's normally set by the Application
5758
$command->setName('make:foo');
5859
$tester = new CommandTester($command);

0 commit comments

Comments
 (0)