Skip to content

Commit

Permalink
Merge branch '7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Nocon committed Apr 19, 2018
2 parents 5cd333a + baccad3 commit ae0a415
Showing 1 changed file with 13 additions and 1 deletion.
Expand Up @@ -6,6 +6,9 @@
namespace eZ\Bundle\EzPublishCoreBundle\Features\Context;

use Behat\Behat\Context\Context;
use Behat\Symfony2Extension\Context\KernelDictionary;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Yaml\Yaml;

/**
Expand All @@ -16,6 +19,8 @@
*/
class YamlConfigurationContext implements Context
{
use KernelDictionary;

private static $platformConfigurationFilePath = 'app/config/ezplatform_behat.yml';

public function addConfiguration(array $configuration)
Expand All @@ -30,7 +35,14 @@ public function addConfiguration(array $configuration)

$this->addImportToPlatformYaml($destinationFileName);

shell_exec('php bin/console --env=behat cache:clear');
$application = new Application($this->getKernel());
$application->setAutoExit(false);

$input = new ArrayInput([
'command' => 'cache:clear',
]);

$application->run($input);
}

private function addImportToPlatformYaml($importedFileName)
Expand Down

0 comments on commit ae0a415

Please sign in to comment.