README.md

Same filename in this branch
  1. 11.x composer/Plugin/ProjectMessage/README.md
  2. 11.x composer/Plugin/Scaffold/README.md
  3. 11.x composer/Plugin/RecipeUnpack/README.md
  4. 11.x core/themes/olivero/README.md
  5. 11.x core/themes/claro/images/core/README.md
  6. 11.x core/themes/starterkit_theme/README.md
  7. 11.x core/modules/package_manager/tests/fixtures/build_test_projects/README.md
  8. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/project-with-illegal-dir-scaffold/assets/README.md
  9. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-composer-drupal-project/docroot/sites/default/README.md
  10. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-composer-drupal-project/docroot/README.md
  11. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/README.md
  12. 11.x core/tests/PHPStan/README.md
  13. 11.x core/tests/README.md
  14. 11.x README.md
Same filename and directory in other branches
  1. 7.x misc/brumann/polyfill-unserialize/README.md
  2. 7.x misc/typo3/phar-stream-wrapper/README.md
  3. 9 composer/Plugin/ProjectMessage/README.md
  4. 9 composer/Plugin/Scaffold/README.md
  5. 9 core/themes/olivero/README.md
  6. 9 core/themes/claro/images/core/README.md
  7. 9 core/themes/starterkit_theme/README.md
  8. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/project-with-illegal-dir-scaffold/assets/README.md
  9. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-composer-drupal-project/docroot/sites/default/README.md
  10. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-composer-drupal-project/docroot/README.md
  11. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/README.md
  12. 9 core/tests/README.md
  13. 9 core/assets/vendor/modernizr/README.md
  14. 9 README.md

This directory is used as the basis for quasi-functional tests of Package Manager based on \Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase. It provides a bare-bones simulation of a real Drupal site layout, including:

  • A .git directory and .gitignore file
  • A Drupal core directory with npm modules installed
  • An example contrib module with its own .git directory and npm modules
  • A directory in which to store private files (private)
  • A default site directory with site-specific config files, as well as default versions of them
  • A "real" site directory (example.com), with a public files directory, site-specific config files, and a SQLite database
  • A simpletest directory containing artifacts from automated tests
  • A vendor directory to contain installed Composer dependencies
  • composer.json and composer.lock files

Tests which use this mock site will clone it into a temporary location, then run real Composer commands in it, along with other Package Manager operations, and make assertions about the results. It's important to understand that this mock site is not at all bootable or usable as a real Drupal site. But as far as Package Manager and Composer are concerned, it IS a completely valid project that can go through all phases of the stage life cycle.

The files named ignore.txt are named that way because Package Manager should ALWAYS ignore them when creating a staged copy of this mock site -- that is, they should never be copied into the stage directory, or removed from their original place, by Package Manager.

The .git directories are named _git because we cannot commit .git directories to our git repository. When a test clones this mock site, these directories are automatically renamed to .git in the copy.

This fixture can be re-created at any time by running, from the repository root, php scripts/PackageManagerFixtureCreator.php.

File

core/modules/package_manager/tests/fixtures/fake_site/README.md

View source
This directory is used as the basis for quasi-functional tests of Package Manager based on `\Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase`. It provides a bare-bones simulation of a real Drupal site layout, including:

* A `.git` directory and `.gitignore` file
* A Drupal core directory with npm modules installed
* An `example` contrib module with its own `.git` directory and npm modules
* A directory in which to store private files (`private`)
* A default site directory with site-specific config files, as well as default versions of them
* A "real" site directory (`example.com`), with a public `files` directory, site-specific config files, and a SQLite database
* A `simpletest` directory containing artifacts from automated tests
* A `vendor` directory to contain installed Composer dependencies
* `composer.json` and `composer.lock` files

Tests which use this mock site will clone it into a temporary location, then run real Composer commands in it, along with other Package Manager operations, and make assertions about the results. It's important to understand that this mock site is not at all bootable or usable as a real Drupal site. But as far as Package Manager and Composer are concerned, it IS a completely valid project that can go through all phases of the stage life cycle.

The files named `ignore.txt` are named that way because Package Manager should ALWAYS ignore them when creating a staged copy of this mock site -- that is, they should never be copied into the stage directory, or removed from their original place, by Package Manager.

The `.git` directories are named `_git` because we cannot commit `.git` directories to our git repository. When a test clones this mock site, these directories are automatically renamed to `.git` in the copy.

This fixture can be re-created at any time by running, from the repository root, `php scripts/PackageManagerFixtureCreator.php`.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.