From 77c0cdf5aacfd5287d4e30411a9c12f82212aacc Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 13 Feb 2024 11:47:57 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B07246=20:memo:=20test=20README=20:=20add?= =?UTF-8?q?=20markTestAsSkipped=20restrictions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/php-unit-tests/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/php-unit-tests/README.md b/tests/php-unit-tests/README.md index 22ceaec3b..fb3f48fdb 100644 --- a/tests/php-unit-tests/README.md +++ b/tests/php-unit-tests/README.md @@ -7,7 +7,6 @@ - Covers the consistency of some data through the app? - Most likely in "integration-tests". - ## Tests prerequisites Install iTop with default setup options : @@ -20,7 +19,13 @@ Plus : - Additional ITIL tickets : check Known Errors Management and FAQ -## How do I make sure that my tests are efficient? +## What about skipped tests ? +A test can be marked as skipped by using the `markTestAsSkipped()` PHPUnit method. Please use it only for temporary disabled tests, for example the ones that are pushed before their corresponding fix. + +For other cases like non-relevant data provider cases, just mark the test valid with `assertTrue(true)` and `return`. + + +## How do I make sure that my tests are efficient? (performences) ### Derive from the relevant test class