You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A test file can affect a test in which it is not used.
How to reproduce
create a test file named testFailureTesting.php in the directory php/php.editor/test/unit/data/testfiles/completion/documentation/
copy the contents of the test file php/php.editor/test/unit/data/testfiles/completion/documentation/arrayReturnType.php into the newly created file
run testArrayReturnType in php/php.editor/test/unit/src/org/netbeans/modules/php/editor/completion/PHPCCDocumentationTest.java
We will get a failed test for a reason:
Actual content contains following lines which are missing in expected content:
------------------------------------
METHOD functionName() [PUBLIC] testFailureTesting.php
Expected content contains following lines which are missing in actual content:
METHOD functionName() [PUBLIC] arrayReturnType.php
although testFailureTesting.php has nothing to do with this test.
troizet
changed the title
PHP: A test file can affect a test in which it is not used.
A test file can affect a test in which it is not used.
Jun 10, 2023
Apache NetBeans version
Apache NetBeans 18
What happened
A test file can affect a test in which it is not used.
How to reproduce
create a test file named
testFailureTesting.php
in the directoryphp/php.editor/test/unit/data/testfiles/completion/documentation/
copy the contents of the test file
php/php.editor/test/unit/data/testfiles/completion/documentation/arrayReturnType.php
into the newly created filerun
testArrayReturnType
inphp/php.editor/test/unit/src/org/netbeans/modules/php/editor/completion/PHPCCDocumentationTest.java
We will get a failed test for a reason:
although
testFailureTesting.php
has nothing to do with this test.Did this work correctly in an earlier version?
No / Don't know
Operating System
Ubuntu 22.04.2 LTS
JDK
OpenJDK Runtime Environment 11.0.19+7-post-Ubuntu-0ubuntu122.04.1
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
It seems that the test execution indexes test files that are not related to the test being executed.
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: