Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lookyman committed Dec 19, 2016
1 parent 20c872b commit c00bcd6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/Console/GenerateProxiesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function testCommand()
{
$tempDir = __DIR__ . '/../temp/Console';
Helpers::initTempDir($tempDir);
Helpers::initTempDir($tempDir . '/../proxies');

$container = (new Configurator())
->setTempDirectory($tempDir)
Expand All @@ -24,10 +25,14 @@ public function testCommand()

/** @var Application $application */
$application = $container->getByType(Application::class);
$tester = new CommandTester($application->find('lookyman:nette-proxy:generate'));
$tester->execute(['command' => 'lookyman:nette-proxy:generate']);
$command = $application->find('lookyman:nette-proxy:generate');
$tester = new CommandTester($command);
$tester->execute([
'command' => $command->getName(),
'--debug' => null,
]);

self::assertFileExists(__DIR__ . '/../temp/proxies/ProxyManagerGeneratedProxy__PM__LookymanNetteProxyTestsMockIService2FactoryGeneratedee1449ea0da0fdbf038d28254e9c7b3f.php');
self::assertFileExists(__DIR__ . '/../temp/proxies/ProxyManagerGeneratedProxy__PM__LookymanNetteProxyTestsMockService1Generateda427b08305d9796d18525e91e7b08e56.php');
self::assertNotEquals('', $tester->getDisplay());
self::assertCount(2, new \FilesystemIterator($tempDir . '/../proxies', \FilesystemIterator::SKIP_DOTS));
}
}

0 comments on commit c00bcd6

Please # to comment.