mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Member::getLastName() now correctly returns the Member surname
This commit is contained in:
parent
66ca1c925f
commit
e8c2f963fd
@ -1130,7 +1130,7 @@ class Member extends DataObject
|
||||
*/
|
||||
public function getLastName()
|
||||
{
|
||||
return $this->owner->Surname;
|
||||
return $this->Surname;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1585,4 +1585,12 @@ class MemberTest extends FunctionalTest
|
||||
$result = $member->changePassword('Password123456789'); // 17 characters long
|
||||
$this->assertTrue($result->isValid());
|
||||
}
|
||||
|
||||
public function testGetLastName()
|
||||
{
|
||||
$member = new Member();
|
||||
$member->Surname = 'Johnson';
|
||||
|
||||
$this->assertSame('Johnson', $member->getLastName(), 'getLastName should proxy to Surname');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user