getWorkingPath example


  public function executeCommand($command_line$working_dir = NULL) {
    $this->commandProcess = Process::fromShellCommandline($command_line);
    $this->commandProcess->setWorkingDirectory($this->getWorkingPath($working_dir))
      ->setTimeout(300)
      ->setIdleTimeout(300);
    $this->commandProcess->run();
    return $this->commandProcess;
  }

  /** * Helper function to assert that the last visit was a Drupal site. * * This method asserts that the X-Generator header shows that the site is a * Drupal site. */

  public function testComponentComposerJson(string $component_path): void {
    // Only copy the components. Copy all of them because some of them depend on     // each other.     $finder = $this->getCodebaseFinder();
    $finder->in($this->getDrupalRoot() . static::$componentsPath);
    $this->copyCodebase($finder->getIterator());

    $working_dir = $this->getWorkingPath() . static::$componentsPath . $component_path;

    // We add path repositories so we can wire internal dependencies together.     $this->addExpectedRepositories($working_dir);

    // Perform the installation.     $this->executeCommand("composer install --working-dir=$working_dir --no-interaction --no-progress");
    $this->assertCommandSuccessful();
  }

  /** * Adds expected repositories as path repositories to package under test. * * @param string $working_dir * The working directory. */

  protected function setUp(): void {
    $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')->fetch()[0];
    if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
      $this->markTestSkipped();
    }
    parent::setUp();
    $php_executable_finder = new PhpExecutableFinder();
    $this->php = $php_executable_finder->find();
    $this->copyCodebase();
    $this->executeCommand('COMPOSER_DISCARD_CHANGES=true composer install --no-dev --no-interaction');
    chdir($this->getWorkingPath());
  }

  /** * Generates PHP process to generate a theme from core's starterkit theme. * * @return \Symfony\Component\Process\Process * The PHP process */
  private function generateThemeFromStarterkit($env = NULL) : Process {
    $install_command = [
      $this->php,
      
Home | Imprint | This part of the site doesn't use cookies.