mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: BasicAuthTests fail when Member's unique_identifier_field is anything except the default of Email (from r109834)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112831 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2c7d88aade
commit
274387f0f4
@ -6,12 +6,23 @@
|
||||
|
||||
class BasicAuthTest extends FunctionalTest {
|
||||
|
||||
static $original_unique_identifier_field;
|
||||
|
||||
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() {
|
||||
parent::tearDown();
|
||||
|
||||
BasicAuth::protect_entire_site(false);
|
||||
Member::set_unique_identifier_field(self::$original_unique_identifier_field);
|
||||
}
|
||||
|
||||
function testBasicAuthEnabledWithoutLogin() {
|
||||
|
Loading…
Reference in New Issue
Block a user