From eb5465c5a6571e9df322f2426a708b8e87eb49a3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 7 Nov 2017 01:08:47 +0000 Subject: [PATCH] Update README --- README.md | 10 ++++------ .../{node.type.page.yml => node.type.page.yml_} | 0 tests/src/Kernel/PageListTest.php | 0 3 files changed, 4 insertions(+), 6 deletions(-) rename config/install/{node.type.page.yml => node.type.page.yml_} (100%) create mode 100644 tests/src/Kernel/PageListTest.php diff --git a/README.md b/README.md index 6edca55..4e61bed 100644 --- a/README.md +++ b/README.md @@ -24,23 +24,21 @@ These tests are functional tests based on the `BrowserTestBase` class so need to be executed with PHPUnit (which is required in core's `composer.json` file). The path to your `vendor` directory may be different depending on your setup. -Because of autoloading, you will need to be inside Drupal's `core` subdirectory -when running the tests for them to execute successfully. +Because of autoloading, you will either need to be inside Drupal's `core` subdirectory +, or add `-c core` to the PHPUnit command when running the tests for them to execute successfully. This also assumes that the module is within a `modules/custom` directory and named `tdd_dublin` as per the repository name. ``` -cd core - -../vendor/bin/phpunit ../modules/custom/tdd_dublin +vendor/bin/phpunit -c core modules/custom/tdd_dublin ``` You can use PHPUnit's `--filter` option to specify a single test method to run, rather than all of the tests within the module. For example: ``` -../vendor/bin/phpunit ../modules/custom/tdd_dublin --filter=testOnlyPublishedPagesAreShown +vendor/bin/phpunit -c core modules/custom/tdd_dublin --filter=testOnlyPublishedPagesAreShown ``` [0]: https://www.oliverdavies.uk/talks/tdd-test-driven-drupal diff --git a/config/install/node.type.page.yml b/config/install/node.type.page.yml_ similarity index 100% rename from config/install/node.type.page.yml rename to config/install/node.type.page.yml_ diff --git a/tests/src/Kernel/PageListTest.php b/tests/src/Kernel/PageListTest.php new file mode 100644 index 0000000..e69de29