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
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -471,7 +471,7 @@ class AnotherClass extends Result {}
471
471
472
472
## TestTag
473
473
474
-
The `#[TestTag]` attribute is an idea borrowed from hardware testing. Methods marked with this attribute are only available to test code.
474
+
The `#[TestTag]` attribute is an idea borrowed from hardware testing. Classes or methods marked with this attribute are only available to test code.
475
475
476
476
E.g.
477
477
@@ -503,7 +503,8 @@ class PersonTest
503
503
```
504
504
505
505
NOTES:
506
-
- Methods with the`#[TestTag]` MUST have public visibility.
506
+
- Classes with the `#[TestTag]` will have an error when any interaction with the class is done.
507
+
- Methods with the `#[TestTag]` MUST have public visibility.
507
508
- For determining what is "test code" see the relevant plugin. E.g. the [PHPStan extension](https://github.com/DaveLiddament/phpstan-php-language-extensions) can be setup to either:
508
509
- Assume all classes that end `Test` is test code. See [className config option](https://github.com/DaveLiddament/phpstan-php-language-extensions#exclude-checks-on-class-names-ending-with-test).
509
510
- Assume all classes within a given namespace is test code. See [namespace config option](https://github.com/DaveLiddament/phpstan-php-language-extensions#exclude-checks-based-on-test-namespace).
0 commit comments