From e2399fde2a3ce64a48553e6bfcb3f29ff30dfd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meye?= Date: Mon, 7 Nov 2016 08:31:47 +0100 Subject: [PATCH] Fixed referenced line number in Readme. --- tests/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/README.md b/tests/README.md index 1165b17701d..6b3feef4018 100644 --- a/tests/README.md +++ b/tests/README.md @@ -38,7 +38,7 @@ A text code coverage summary can be displayed using the `--coverage-text` option * Each test method should cover a single method or function with one or more assertions * A single method or function can have multiple associated test methods if it's a large or complex method * Use the test coverage HTML report (under `tmp/coverage/index.html`) to examine which lines your tests are covering and aim for 100% coverage -* For code that cannot be tested (e.g. they require a certain PHP version), you can exclude them from coverage using a comment: `// @codeCoverageIgnoreStart` and `// @codeCoverageIgnoreEnd`. For example, see [`wc_round_tax_total()`](https://github.com/woocommerce/woocommerce/blob/master/includes/wc-formatting-functions.php#L155-155) +* For code that cannot be tested (e.g. they require a certain PHP version), you can exclude them from coverage using a comment: `// @codeCoverageIgnoreStart` and `// @codeCoverageIgnoreEnd`. For example, see [`wc_round_tax_total()`](https://github.com/woocommerce/woocommerce/blob/master/includes/wc-formatting-functions.php#L208-208) * In addition to covering each line of a method/function, make sure to test common input and edge cases. * Prefer `assertsEquals()` where possible as it tests both type & equality * Remember that only methods prefixed with `test` will be run so use helper methods liberally to keep test methods small and reduce code duplication. If there is a common helper method used in multiple test files, consider adding it to the `WC_Unit_Test_Case` class so it can be shared by all test cases