Closed jag-j closed 8 months ago
@jag-j , can you add a test for the scan being triggered after a file is saved?
Food for thought regarding:
Unfortunately there isn't a way to add tests for activation events AFAIK. I looked at some examples on other extensions and they don't seem to have either.
There is always a way to test... but it may require a number of layers of indirection and dependency injection. The trade off is that the code may become unnecessarily complex if we add in a ton of interfaces to achieve indirection and testability. But in this case it seems that if we added in the interfaces for indirection, we would simply be testing that our interfaces were called and wouldn't provide much value other than code coverage purposes. So this mainly depends on how high we want our code coverage numbers. But in terms of functionality testing... doesn't help much if the test code is highly coupled to the source code due to the nature of the feature we are testing.
@jfeingold35 - Unfortunately there isn't a way to add tests for activation events AFAIK. I looked at some examples on other extensions and they don't seem to have either.