mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixed SapphireTest->loginWithPermission() and MemberAuthenticatorTest to use existing Members based on their unique_identifier_field (if existing) to accommodate recent Member->onBeforeWrite() changes (see r100705)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100723 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
90e8171536
commit
83675fc248
@ -686,7 +686,9 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
|||||||
$permission->write();
|
$permission->write();
|
||||||
$group->Permissions()->add($permission);
|
$group->Permissions()->add($permission);
|
||||||
|
|
||||||
$member = new Member();
|
$member = DataObject::get_one('Member', sprintf('"Email" = \'%s\'', "$permCode@example.org"));
|
||||||
|
if(!$member) $member = new Member();
|
||||||
|
|
||||||
$member->FirstName = $permCode;
|
$member->FirstName = $permCode;
|
||||||
$member->Surname = "User";
|
$member->Surname = "User";
|
||||||
$member->Email = "$permCode@example.org";
|
$member->Email = "$permCode@example.org";
|
||||||
|
@ -9,7 +9,7 @@ class MemberAuthenticatorTest extends SapphireTest {
|
|||||||
|
|
||||||
$field=Member::get_unique_identifier_field();
|
$field=Member::get_unique_identifier_field();
|
||||||
|
|
||||||
$member->$field = 'test@test.com';
|
$member->$field = 'test1@test.com';
|
||||||
$member->PasswordEncryption = "sha1";
|
$member->PasswordEncryption = "sha1";
|
||||||
$member->Password = "mypassword";
|
$member->Password = "mypassword";
|
||||||
$member->write();
|
$member->write();
|
||||||
@ -32,7 +32,7 @@ class MemberAuthenticatorTest extends SapphireTest {
|
|||||||
$field=Member::get_unique_identifier_field();
|
$field=Member::get_unique_identifier_field();
|
||||||
|
|
||||||
$member = new Member();
|
$member = new Member();
|
||||||
$member->$field = 'test@test.com';
|
$member->$field = 'test2@test.com';
|
||||||
$member->PasswordEncryption = "crc32";
|
$member->PasswordEncryption = "crc32";
|
||||||
$member->Password = "mypassword";
|
$member->Password = "mypassword";
|
||||||
$member->write();
|
$member->write();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user