mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2473 from ajshort/pull-1
Fix test relying on specific member title format.
This commit is contained in:
commit
26ef1c1830
@ -66,10 +66,11 @@ class LookupFieldTest extends SapphireTest {
|
|||||||
$member1 = $this->objFromFixture('Member', 'member1');
|
$member1 = $this->objFromFixture('Member', 'member1');
|
||||||
$member2 = $this->objFromFixture('Member', 'member2');
|
$member2 = $this->objFromFixture('Member', 'member2');
|
||||||
$member3 = $this->objFromFixture('Member', 'member3');
|
$member3 = $this->objFromFixture('Member', 'member3');
|
||||||
|
|
||||||
$source = DataObject::get('Member');
|
$source = DataObject::get('Member');
|
||||||
$f = new LookupField('test', 'test', $source->map());
|
$f = new LookupField('test', 'test', $source->map('ID', 'FirstName'));
|
||||||
$f->setValue(array($member1->ID, $member2->ID));
|
$f->setValue(array($member1->ID, $member2->ID));
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
sprintf(
|
sprintf(
|
||||||
'<span class="readonly" id="test">member1, member2</span>'
|
'<span class="readonly" id="test">member1, member2</span>'
|
||||||
|
Loading…
Reference in New Issue
Block a user