Skip to content

Commit

Permalink
MDL-61407 privacy: Reset the writer after writer tests
Browse files Browse the repository at this point in the history
The writer was not reset after these tests which had the potential to
affect the next test after these were run.
  • Loading branch information
andrewnicols committed May 3, 2018
1 parent 09a9b8f commit 50f5a09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions privacy/tests/writer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class writer_test extends advanced_testcase {
/**
* Ensure that the writer is cleared away as appropriate after each
* test.
*/
public function tearDown() {
writer::reset();
}

/**
* Test that calling with_context multiple times will return the same write instance.
*/
Expand Down

0 comments on commit 50f5a09

Please sign in to comment.