diff --git a/tests/BlogCategoryTest.php b/tests/BlogCategoryTest.php index caf4b4a..1cc4aa0 100755 --- a/tests/BlogCategoryTest.php +++ b/tests/BlogCategoryTest.php @@ -52,7 +52,7 @@ class BlogCategoryTest extends FunctionalTest $member = Security::getCurrentUser(); if ($member) { - $member->logout(); + Security::setCurrentUser(null); } $this->objFromFixture(BlogPost::class, 'FirstBlogPost'); diff --git a/tests/BlogPostFilterTest.php b/tests/BlogPostFilterTest.php index d82eeaf..da3efa7 100755 --- a/tests/BlogPostFilterTest.php +++ b/tests/BlogPostFilterTest.php @@ -42,7 +42,7 @@ class BlogPostFilterTest extends SapphireTest $member = Security::getCurrentUser(); if ($member) { - $member->logout(); + Security::setCurrentUser(null); } /** diff --git a/tests/BlogTagTest.php b/tests/BlogTagTest.php index be4c982..237572b 100755 --- a/tests/BlogTagTest.php +++ b/tests/BlogTagTest.php @@ -10,6 +10,7 @@ use SilverStripe\Dev\FunctionalTest; use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\ORM\ValidationException; use SilverStripe\Security\Member; +use SilverStripe\Security\Security; /** * @mixin PHPUnit_Framework_TestCase @@ -51,7 +52,7 @@ class BlogTagTest extends FunctionalTest $member = Security::getCurrentUser(); if ($member) { - $member->logout(); + Security::setCurrentUser(null); } $this->objFromFixture(BlogPost::class, 'FirstBlogPost'); diff --git a/tests/BlogTest.php b/tests/BlogTest.php index 6e0ef7a..a942267 100755 --- a/tests/BlogTest.php +++ b/tests/BlogTest.php @@ -62,7 +62,7 @@ class BlogTest extends SapphireTest $member = Security::getCurrentUser(); if ($member) { - $member->logout(); + Security::setCurrentUser(null); } /** @@ -86,7 +86,7 @@ class BlogTest extends SapphireTest $member = Security::getCurrentUser(); if ($member) { - $member->logout(); + Security::setCurrentUser(null); } /**