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
Right now you can only disable a test statically, sometimes you might want to disable a test only if certain conditions are met. For example, if the code under test is optional for your application and requires a certain extension the test suite should disable any tests that require that extension if it is not available. This is currently not possible. We should avoid introducing a TestCase::markDisabled... it requires all of the hooks and test processing to still be invoked when we could, and should, be skipping past these potentially costly, error-triggering procedures. Instead we should introduce a #[DisabledIf($method, $reason)] Attribute. The $method should be a public method on the class it was annotated on. If it returns true the test will be disabled otherwise it will run as normal.
The text was updated successfully, but these errors were encountered:
I decided to move this out of the 0.6 release because getting this implemented is going to require changing around a fair amount of how we think of disabled tests. Statistics for pre running will need to be adjusted because we no longer can reliably tell whether or not a given test/case/suite is disable until runtime. I believe that this feature is important enough and has enough impact on the existing codebase that the implementation needs more thought.
Right now you can only disable a test statically, sometimes you might want to disable a test only if certain conditions are met. For example, if the code under test is optional for your application and requires a certain extension the test suite should disable any tests that require that extension if it is not available. This is currently not possible. We should avoid introducing a
TestCase::markDisabled
... it requires all of the hooks and test processing to still be invoked when we could, and should, be skipping past these potentially costly, error-triggering procedures. Instead we should introduce a#[DisabledIf($method, $reason)]
Attribute. The$method
should be a public method on the class it was annotated on. If it returns true the test will be disabled otherwise it will run as normal.The text was updated successfully, but these errors were encountered: