From 3b96a2c9acf6a38d5c1bfc1a85fdab0ad9a57018 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 25 Jun 2018 08:53:57 +1200 Subject: [PATCH] DOCS Vendor paths for test docs [ci-skip] --- .../02_Developer_Guides/06_Testing/index.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/02_Developer_Guides/06_Testing/index.md b/docs/en/02_Developer_Guides/06_Testing/index.md index 2932e3737..a29fe38dc 100644 --- a/docs/en/02_Developer_Guides/06_Testing/index.md +++ b/docs/en/02_Developer_Guides/06_Testing/index.md @@ -28,10 +28,10 @@ These are not included in the standard archive downloads provided from silverstr Tests are run from the commandline, in your webroot folder: * `vendor/bin/phpunit`: Runs all tests (as defined by `phpunit.xml`) - * `vendor/bin/phpunit framework/tests/`: Run all tests of a specific module - * `vendor/bin/phpunit framework/tests/filesystem`: Run specific tests within a specific module - * `vendor/bin/phpunit framework/tests/filesystem/FolderTest.php`: Run a specific test - * `vendor/bin/phpunit framework/tests '' flush=all`: Run tests with optional request parameters (note the empty second argument) + * `vendor/bin/phpunit vendor/silverstripe/framework/tests/`: Run all tests of a specific module + * `vendor/bin/phpunit vendor/silverstripe/framework/tests/filesystem`: Run specific tests within a specific module + * `vendor/bin/phpunit vendor/silverstripe/framework/tests/filesystem/FolderTest.php`: Run a specific test + * `vendor/bin/phpunit vendor/silverstripe/framework/tests '' flush=all`: Run tests with optional request parameters (note the empty second argument) Check the PHPUnit manual for all available [command line arguments](http://www.phpunit.de/manual/current/en/textui.html). @@ -54,12 +54,12 @@ some `thirdparty/` directories add the following to the `phpunit.xml` configurat :::xml - framework/dev/ - framework/thirdparty/ - cms/thirdparty/ + vendor/silverstripe/framework/dev/ + vendor/silverstripe/framework/thirdparty/ + vendor/silverstripe/cms/thirdparty/ - mysite/thirdparty/ + app/thirdparty/ @@ -86,11 +86,11 @@ should have the appropriate permissions to create new databases on your server, ## Writing Tests Tests are written by creating subclasses of [SapphireTest](api:SilverStripe\Dev\SapphireTest). You should put tests for your site in the -`mysite/tests` directory. If you are writing tests for a module, put them in the `(modulename)/tests` directory. +`app/tests` directory. If you are writing tests for a module, put them in the `tests/` directory of your module (in `vendor/`). Generally speaking, there should be one test class for each application class. The name of the test class should be the application class, with "Test" as a suffix. For instance, we have all the tests for `SiteTree` in -`framework/tests/SiteTreeTest.php` +`vendor/silverstripe/framework/tests/SiteTreeTest.php` You will generally write two different kinds of test classes.