From c3e1c9b1f3b216ab70ad71b87abcd0a610d8549a Mon Sep 17 00:00:00 2001 From: David Monllao Date: Wed, 2 Sep 2015 13:08:30 +0800 Subject: [PATCH] MDL-50891 core_useragent: Restore default after tests --- lib/tests/useragent_test.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tests/useragent_test.php b/lib/tests/useragent_test.php index cb7ac3de8a8..f0dd54d5052 100644 --- a/lib/tests/useragent_test.php +++ b/lib/tests/useragent_test.php @@ -31,6 +31,13 @@ */ class core_useragent_testcase extends basic_testcase { + /** + * Restores the user agent to the default one. + */ + public function tearDown() { + core_useragent::instance(true); + } + public function user_agents_providers() { // Note: When adding new entries to this list, please ensure that any new browser versions are added to the corresponding list. // This ensures that regression tests are applied to all known user agents.