From 98b6b973e8a063d9c8e67c2ec64f1ece82cb66a6 Mon Sep 17 00:00:00 2001 From: Christopher Allford Date: Thu, 30 Apr 2020 10:09:42 -0700 Subject: [PATCH] Updated the tests readme to explain the purpose of our two test directories --- tests/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/README.md b/tests/README.md index 0c238464efb..e352b11933f 100644 --- a/tests/README.md +++ b/tests/README.md @@ -54,6 +54,7 @@ A text code coverage summary can be displayed using the `--coverage-text` option ### Writing Tests +* There are two different PHPUnit directories, `tests/legacy` and `tests/php`. The `tests/legacy` directory contains all of the tests for code in the `includes` directory, and the `tests/php` directory is a PSR-4 namespaced directory for tests of code in the `src` directory. * Each test file should roughly correspond to an associated source file, e.g. the `formatting/functions.php` test file covers code in the `wc-formatting-functions.php` file * 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