diff --git a/Classes/Command/AcceptanceTestsCommand.php b/Classes/Command/AcceptanceTestsCommand.php
index a74bf92..3a4c1b6 100644
--- a/Classes/Command/AcceptanceTestsCommand.php
+++ b/Classes/Command/AcceptanceTestsCommand.php
@@ -14,7 +14,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Exception\IOException;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
@@ -32,11 +31,6 @@ class AcceptanceTestsCommand extends AbstractCommand
*/
protected $filesystem;
- /**
- * @var SymfonyStyle $io
- */
- protected $io;
-
/**
* @var PackageInterface $package
*/
@@ -54,8 +48,7 @@ protected function configure(): void
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
- $this->io = new SymfonyStyle($input, $output);
- $this->package = $this->askForPackage($this->io);
+ $this->package = $this->packageResolver->resolvePackage($this->askForExtensionKey());
$packageKey = $this->package->getPackageKey();
$targetPackagePath = $this->package->getPackagePath();
@@ -70,7 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$finder = GeneralUtility::makeInstance(Finder::class);
$codeTemplatePath = '/Resources/Private/CodeTemplates/AcceptanceTests';
- $templatePath = $this->getPackageResolver()->resolvePackage('b13/make')->getPackagePath() . $codeTemplatePath;
+ $templatePath = $this->packageResolver->resolvePackage('b13/make')->getPackagePath() . $codeTemplatePath;
$this->filesystem->mkdir([
$targetPackagePath . '/Tests/Acceptance/Fixtures',
diff --git a/Classes/Command/RunTestsCommand.php b/Classes/Command/RunTestsCommand.php
index b378c4f..e6becf8 100644
--- a/Classes/Command/RunTestsCommand.php
+++ b/Classes/Command/RunTestsCommand.php
@@ -73,6 +73,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
);
}
+ $this->io->writeln('Created docker environment for testing:');
+ $filePaths = array_map(function ($ar) {return $ar['target'];}, $templatesToCreate);
+ $this->io->listing($filePaths);
+ $this->io->writeln('For details run "cd ' . $this->package->getPackagePath() . ' && ' . 'Build/Scripts/runTests.sh -h"');
+
return 0;
}
@@ -94,6 +99,9 @@ protected function prepareTemplate(string $source, string $target): void
try {
$this->filesystem->dumpFile($target, $templateContent);
+ if ((pathinfo($target)['extension'] ?? '') === 'sh') {
+ $this->filesystem->chmod([$target], 0770);
+ }
} catch (IOException $exception) {
$this->io->writeln('Failed to save file in ' . $target . PHP_EOL . $exception->getMessage() . '');
}