From afc1a3dd2503862cc6823ec7b69c914a36a9e949 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Fri, 6 Apr 2018 10:24:04 +1200 Subject: [PATCH] Use SapphireTest::logOut over manually checking Security::getCurrentUser --- tests/BlogTest.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/BlogTest.php b/tests/BlogTest.php index 55b4d7a..3238a86 100755 --- a/tests/BlogTest.php +++ b/tests/BlogTest.php @@ -49,11 +49,7 @@ class BlogTest extends SapphireTest public function testGetExcludedSiteTreeClassNames() { - $member = Security::getCurrentUser(); - - if ($member) { - Security::setCurrentUser(null); - } + $this->logOut(); /** * @var Blog $blog @@ -73,11 +69,7 @@ class BlogTest extends SapphireTest public function testGetArchivedBlogPosts() { - $member = Security::getCurrentUser(); - - if ($member) { - Security::setCurrentUser(null); - } + $this->logOut(); /** * @var Blog $blog