mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX updated deprecated Member::logout() calls
This commit is contained in:
parent
e70e051380
commit
0b5b71c0fb
@ -52,7 +52,7 @@ class BlogCategoryTest extends FunctionalTest
|
|||||||
$member = Security::getCurrentUser();
|
$member = Security::getCurrentUser();
|
||||||
|
|
||||||
if ($member) {
|
if ($member) {
|
||||||
$member->logout();
|
Security::setCurrentUser(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->objFromFixture(BlogPost::class, 'FirstBlogPost');
|
$this->objFromFixture(BlogPost::class, 'FirstBlogPost');
|
||||||
|
@ -42,7 +42,7 @@ class BlogPostFilterTest extends SapphireTest
|
|||||||
$member = Security::getCurrentUser();
|
$member = Security::getCurrentUser();
|
||||||
|
|
||||||
if ($member) {
|
if ($member) {
|
||||||
$member->logout();
|
Security::setCurrentUser(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,6 +10,7 @@ use SilverStripe\Dev\FunctionalTest;
|
|||||||
use SilverStripe\ORM\FieldType\DBDatetime;
|
use SilverStripe\ORM\FieldType\DBDatetime;
|
||||||
use SilverStripe\ORM\ValidationException;
|
use SilverStripe\ORM\ValidationException;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
|
use SilverStripe\Security\Security;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
* @mixin PHPUnit_Framework_TestCase
|
||||||
@ -51,7 +52,7 @@ class BlogTagTest extends FunctionalTest
|
|||||||
$member = Security::getCurrentUser();
|
$member = Security::getCurrentUser();
|
||||||
|
|
||||||
if ($member) {
|
if ($member) {
|
||||||
$member->logout();
|
Security::setCurrentUser(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->objFromFixture(BlogPost::class, 'FirstBlogPost');
|
$this->objFromFixture(BlogPost::class, 'FirstBlogPost');
|
||||||
|
@ -62,7 +62,7 @@ class BlogTest extends SapphireTest
|
|||||||
$member = Security::getCurrentUser();
|
$member = Security::getCurrentUser();
|
||||||
|
|
||||||
if ($member) {
|
if ($member) {
|
||||||
$member->logout();
|
Security::setCurrentUser(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +86,7 @@ class BlogTest extends SapphireTest
|
|||||||
$member = Security::getCurrentUser();
|
$member = Security::getCurrentUser();
|
||||||
|
|
||||||
if ($member) {
|
if ($member) {
|
||||||
$member->logout();
|
Security::setCurrentUser(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user