Travis fixes

This commit is contained in:
Guy Marriott 2018-07-16 14:34:08 +12:00
parent ff3c8eb2bb
commit 70e83c0995
No known key found for this signature in database
GPG Key ID: A80F9ACCB86D3DA7
2 changed files with 6 additions and 7 deletions

View File

@ -213,8 +213,7 @@ class TagField extends DropdownField
]; ];
if (!$this->getShouldLazyLoad()) { if (!$this->getShouldLazyLoad()) {
$schema['options'] = array_values($this->getOptions()->toNestedArray()); $schema['options'] = array_values($this->getOptions()->toNestedArray());
} } else {
else {
if ($this->Value()) { if ($this->Value()) {
$schema['value'] = $this->getOptions(true)->toNestedArray(); $schema['value'] = $this->getOptions(true)->toNestedArray();
} }

View File

@ -180,7 +180,7 @@ class TagFieldTest extends SapphireTest
$request = $this->getNewRequest(array('term' => 'Tag')); $request = $this->getNewRequest(array('term' => 'Tag'));
$this->assertEquals( $this->assertEquals(
'{"items":[{"id":"Tag1","text":"Tag1"}]}', '{"items":[{"Title":"Tag1","Value":"Tag1"}]}',
$field->suggest($request)->getBody() $field->suggest($request)->getBody()
); );
@ -190,7 +190,7 @@ class TagFieldTest extends SapphireTest
$request = $this->getNewRequest(array('term' => '222')); $request = $this->getNewRequest(array('term' => '222'));
$this->assertEquals( $this->assertEquals(
'{"items":[{"id":"222","text":"222"}]}', '{"items":[{"Title":"222","Value":"222"}]}',
$field->suggest($request)->getBody() $field->suggest($request)->getBody()
); );
@ -200,7 +200,7 @@ class TagFieldTest extends SapphireTest
$request = $this->getNewRequest(array('term' => 'TAG1')); $request = $this->getNewRequest(array('term' => 'TAG1'));
$this->assertEquals( $this->assertEquals(
'{"items":[{"id":"Tag1","text":"Tag1"}]}', '{"items":[{"Title":"Tag1","Value":"Tag1"}]}',
$field->suggest($request)->getBody() $field->suggest($request)->getBody()
); );
@ -229,7 +229,7 @@ class TagFieldTest extends SapphireTest
$request = $this->getNewRequest(array('term' => 'Tag')); $request = $this->getNewRequest(array('term' => 'Tag'));
$this->assertEquals( $this->assertEquals(
'{"items":[{"id":"Tag1","text":"Tag1"}]}', '{"items":[{"Title":"Tag1","Value":"Tag1"}]}',
$field->suggest($request)->getBody() $field->suggest($request)->getBody()
); );
@ -239,7 +239,7 @@ class TagFieldTest extends SapphireTest
$request = $this->getNewRequest(array('term' => 'Tag1')); $request = $this->getNewRequest(array('term' => 'Tag1'));
$this->assertEquals( $this->assertEquals(
'{"items":[{"id":"Tag1","text":"Tag1"}]}', '{"items":[{"Title":"Tag1","Value":"Tag1"}]}',
$field->suggest($request)->getBody() $field->suggest($request)->getBody()
); );