public function TestSubContext::configurePrivateFiles in Panopoly 8.2
Same name and namespace in other branches
- 7 modules/panopoly/panopoly_test/behat/steps/panopoly_test.behat.inc \TestSubContext::configurePrivateFiles()
Configure a private files path if one isn't already configured.
@BeforeScenario @api&&@drupal_private_files
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test.behat.inc, line 282 - Provide Behat step-definitions for generic Panopoly tests.
Class
- TestSubContext
- Behat sub-context for Panopoly.
Code
public function configurePrivateFiles($event) {
$file_public_path = PublicStream::basePath();
$file_private_path = $file_public_path . '/private';
\Drupal::getContainer()
->get('state')
->set('panopoly_test_private_file_path', $file_private_path);
\Drupal::service('kernel')
->invalidateContainer();
}