mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: BasicAuthTests fail when Member's unique_identifier_field is anything except the default of Email
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109834 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5ba5c88248
commit
deae822827
@ -6,12 +6,23 @@
|
|||||||
|
|
||||||
class BasicAuthTest extends FunctionalTest {
|
class BasicAuthTest extends FunctionalTest {
|
||||||
|
|
||||||
|
static $original_unique_identifier_field;
|
||||||
|
|
||||||
static $fixture_file = 'sapphire/tests/security/BasicAuthTest.yml';
|
static $fixture_file = 'sapphire/tests/security/BasicAuthTest.yml';
|
||||||
|
|
||||||
|
function setUp() {
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
// Fixtures assume Email is the field used to identify the log in identity
|
||||||
|
self::$original_unique_identifier_field = Member::get_unique_identifier_field();
|
||||||
|
Member::set_unique_identifier_field('Email');
|
||||||
|
}
|
||||||
|
|
||||||
function tearDown() {
|
function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
||||||
BasicAuth::protect_entire_site(false);
|
BasicAuth::protect_entire_site(false);
|
||||||
|
Member::set_unique_identifier_field(self::$original_unique_identifier_field);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testBasicAuthEnabledWithoutLogin() {
|
function testBasicAuthEnabledWithoutLogin() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user