Update README
This commit is contained in:
parent
af09babd7a
commit
eb5465c5a6
10
README.md
10
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
|
||||
|
|
0
tests/src/Kernel/PageListTest.php
Normal file
0
tests/src/Kernel/PageListTest.php
Normal file
Loading…
Reference in a new issue