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
I use PhpStorm Code Inspection extensively and sometimes I suppress certain inspections for the entire file. Suppression of inspections is done using a similar comment at the beginning of the file.
/**
@noinspection PhpUnhandledExceptionInspection Because ->run() can throw an AssertException and it is, in fact, desirable to happen if the test fails.
*/
PhpStorm generates such comments for you when you indicate your intent to suppress certain inspections, BUT once it places them into TestCase files, Nette Tester will become confused and stop treating them as TestCase files.
It is likely that Nette Tester expects the @testcase annotation to be in the first comment of the file.
Steps To Reproduce
Make your own test that starts like this:
<?php
/** @noinspection PhpUnhandledExceptionInspection Because ->run() can throw an AssertException and it is, in fact, desirable to happen if the test fails. */
declare(strict_types=1);
namespace (your namespace)
use (your use statements)
/**
* @testCase
*/
final class SystemTest extends TestCase
{
protected function test1() {...}
protected function test2() {...}
}
You will see that the test methods no longer run in separate processes.
Expected Behavior
I would expect Nette Tester to accept the possibility of having @testcase annotation in any comment before the "class extends ..." line, not necessarily the first one.
All sorts of automated tools add comments into files, thus possibly breaking the "first comment in the file" principle.
The text was updated successfully, but these errors were encountered:
Version: 2.5.4
Bug Description
I use PhpStorm Code Inspection extensively and sometimes I suppress certain inspections for the entire file. Suppression of inspections is done using a similar comment at the beginning of the file.
/**
@noinspection PhpUnhandledExceptionInspection Because ->run() can throw an AssertException and it is, in fact, desirable to happen if the test fails.
*/
PhpStorm generates such comments for you when you indicate your intent to suppress certain inspections, BUT once it places them into TestCase files, Nette Tester will become confused and stop treating them as TestCase files.
It is likely that Nette Tester expects the @testcase annotation to be in the first comment of the file.
Steps To Reproduce
Make your own test that starts like this:
You will see that the test methods no longer run in separate processes.
Expected Behavior
I would expect Nette Tester to accept the possibility of having @testcase annotation in any comment before the "class extends ..." line, not necessarily the first one.
All sorts of automated tools add comments into files, thus possibly breaking the "first comment in the file" principle.
The text was updated successfully, but these errors were encountered: