mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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()
|
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
|
$result = $member->changePassword('Password123456789'); // 17 characters long
|
||||||
$this->assertTrue($result->isValid());
|
$this->assertTrue($result->isValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetLastName()
|
||||||
|
{
|
||||||
|
$member = new Member();
|
||||||
|
$member->Surname = 'Johnson';
|
||||||
|
|
||||||
|
$this->assertSame('Johnson', $member->getLastName(), 'getLastName should proxy to Surname');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user