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
SapphireTest can utilize a @useDatabase false annotation to not reset the database when there's a unit test method inside of test class that does use the database, either because $usesDatabase = true, or because a yml fixture file is being used. This saves a little running time.
Acceptance criteria
Create a code writer to identify unit test classes that use the database, and test methods inside those classes that don't use the database
Add the @useDatabase false annotation to those methods
The text was updated successfully, but these errors were encountered:
You can also set protected $usesDatabase = false; in a class to explicitly not use database for any tests in that class, which is probably preferable to annotating all the methods in that class.
SapphireTest can utilize a
@useDatabase false
annotation to not reset the database when there's a unit test method inside of test class that does use the database, either because $usesDatabase = true, or because a yml fixture file is being used. This saves a little running time.Acceptance criteria
@useDatabase false
annotation to those methodsThe text was updated successfully, but these errors were encountered: