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
1 changed files with 2 additions and 10 deletions

View File

@ -49,11 +49,7 @@ class BlogTest extends SapphireTest
public function testGetExcludedSiteTreeClassNames() public function testGetExcludedSiteTreeClassNames()
{ {
$member = Security::getCurrentUser(); $this->logOut();
if ($member) {
Security::setCurrentUser(null);
}
/** /**
* @var Blog $blog * @var Blog $blog
@ -73,11 +69,7 @@ class BlogTest extends SapphireTest
public function testGetArchivedBlogPosts() public function testGetArchivedBlogPosts()
{ {
$member = Security::getCurrentUser(); $this->logOut();
if ($member) {
Security::setCurrentUser(null);
}
/** /**
* @var Blog $blog * @var Blog $blog