Skip to content

Commit

Permalink
Recommend calling resetAll() on tearDown() (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Dec 26, 2020
1 parent 3471573 commit cdac49a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ class MyTest extends WebTestCase

// ...
self::$client->request(...);
}

// To make sure we dont use affect other tests
protected function tearDown(): void
{
// To make sure we don't affect other tests
ServiceMock::resetAll();
// You can include the RestoreServiceContainer trait to automatically reset services
}
Expand Down

0 comments on commit cdac49a

Please sign in to comment.