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
@@ -408,7 +408,7 @@ class AnotherClass extends Result {}
408
408
409
409
## TestTag
410
410
411
-
The `#[TestTag]` attribute is an idea borrowed from hardware testing. Methods marked with this attribute are only available to test code.
411
+
The `#[TestTag]` attribute is an idea borrowed from hardware testing. Classes or methods marked with this attribute are only available to test code.
412
412
413
413
E.g.
414
414
@@ -440,7 +440,8 @@ class PersonTest
440
440
```
441
441
442
442
NOTES:
443
-
- Methods with the`#[TestTag]` MUST have public visibility.
443
+
- Classes with the `#[TestTag]` will have an error when any interaction with the class is done.
444
+
- Methods with the `#[TestTag]` MUST have public visibility.
444
445
- 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:
445
446
- 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).
446
447
- 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