Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testCommand() |
||
14 | { |
||
15 | $tempDir = __DIR__ . '/../temp/Console'; |
||
16 | Helpers::initTempDir($tempDir); |
||
17 | |||
18 | $container = (new Configurator()) |
||
19 | ->setTempDirectory($tempDir) |
||
20 | ->setDebugMode(true) |
||
21 | ->addConfig(__DIR__ . '/../config/config.neon') |
||
22 | ->createContainer(); |
||
23 | $container->initialize(); |
||
24 | |||
25 | /** @var Application $application */ |
||
26 | $application = $container->getByType(Application::class); |
||
27 | $tester = new CommandTester($application->find('lookyman:nette-proxy:generate')); |
||
28 | $tester->execute(['command' => 'lookyman:nette-proxy:generate']); |
||
29 | |||
30 | self::assertFileExists(__DIR__ . '/../temp/proxies/ProxyManagerGeneratedProxy__PM__LookymanNetteProxyTestsMockIService2FactoryGeneratedee1449ea0da0fdbf038d28254e9c7b3f.php'); |
||
31 | self::assertFileExists(__DIR__ . '/../temp/proxies/ProxyManagerGeneratedProxy__PM__LookymanNetteProxyTestsMockService1Generateda427b08305d9796d18525e91e7b08e56.php'); |
||
32 | } |
||
33 | } |
||
34 |