Use SapphireTest::logOut over manually checking Security::getCurrentUser

This commit is contained in:
Robbie Averill 2018-04-06 10:24:04 +12:00
parent 9d26cff23d
commit afc1a3dd25

View File

@ -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