X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fpermissions_by_term%2FREADME.md;fp=web%2Fmodules%2Fcontrib%2Fpermissions_by_term%2FREADME.md;h=b169224386a24b490fb90158ee3393373cd719b1;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hp=0000000000000000000000000000000000000000;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68;p=yaffs-website diff --git a/web/modules/contrib/permissions_by_term/README.md b/web/modules/contrib/permissions_by_term/README.md new file mode 100755 index 000000000..b16922438 --- /dev/null +++ b/web/modules/contrib/permissions_by_term/README.md @@ -0,0 +1,69 @@ +Permissions by Term +==================================== + +Visit [Pbt's documentation page on Drupal.org](https://www.drupal.org/docs/8/modules/permissions-by-term) to +learn how to use this module. + +## Modules which extend PbT's functionality +- [Webform Permissions By Term](https://www.drupal.org/project/webform_permissions_by_term) +This modules will be merged into PbT soon. +- [Permissions by Entity](https://www.drupal.org/project/permissions_by_entity) +This module is now merged into PbT + +## Behat testing + +### composer.json config +Make sure that the dependencies the PbT module are installed. Check your drupal's `composer.json` file +for the following contents: + + "require": { + "composer/installers": "^1.0.24", + "wikimedia/composer-merge-plugin": "~1.4" + }, + + ... + + "merge-plugin": { + "include": [ + "core/composer.json", + "modules/permissions_by_term/composer.json" + ], + "recurse": false, + "replace": false, + "merge-extra": false + }, + + ... + + "autoload": { + "psr-4": { + "Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer", + "Drupal\\Tests\\permissions_by_term\\Behat\\Context\\": "modules/permissions_by_term/tests/src/Behat/Context" + } + }, + +### behat.yml file +Use the file at `tests/src/Behat/behat.yml.dist` as a template for your needs. Copy and name it to `behat.yml` and change +it's paths according to your needs. + +### Chromedriver +It is recommended to use the [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) as the driver between +your Google Chrome browser and Behat. Make sure, that the Chromedriver version matches your operating system and your +Google Chrome browser version. + +### Quick testing with a SQlite database +In permissions_by_term/tests/src/Behat/fixtures/db.sqlite` you can find a SQLite database to test from. It is a standard +Drupal 8 installation with PbT module installed. That way each test run proceeds quicker, because it is 1 file +instead an entire relational database. + +Make sure that the path to the SQLite database is contained in your `settings.php` file. PbT awaits that the path is +`/sites/default/db.sqlite`. E.g.: + + $databases['default']['default'] = array ( + 'database' => '/Users/peter/Dev/mamp/permissions-by-term/sites/default/db.sqlite', + 'prefix' => '', + 'namespace' => 'Drupal\\Core\\Database\\Driver\\sqlite', + 'driver' => 'sqlite', + ); + +The database file location is fixed, because the DB gets wiped after each Behat test suite run.