mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Tests for Member::getName() and Member::setName() (from r109333)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112823 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
00ddc0ff83
commit
38f9e74fba
@ -487,6 +487,20 @@ class MemberTest extends FunctionalTest {
|
||||
$this->addExtensions($extensions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for {@link Member::getName()} and {@link Member::setName()}
|
||||
*/
|
||||
function testName() {
|
||||
$member = $this->objFromFixture('Member', 'test');
|
||||
$member->setName('Test Some User');
|
||||
$this->assertEquals('Test Some User', $member->getName());
|
||||
$member->setName('Test');
|
||||
$this->assertEquals('Test', $member->getName());
|
||||
$member->FirstName = 'Test';
|
||||
$member->Surname = '';
|
||||
$this->assertEquals('Test', $member->getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given array of member extensions as class names.
|
||||
* This is useful for re-adding extensions after being removed
|
||||
|
Loading…
x
Reference in New Issue
Block a user