mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
Merge branch '2.4' into 2
This commit is contained in:
commit
2830b221f1
17
.travis.yml
17
.travis.yml
@ -4,27 +4,30 @@ dist: trusty
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMPOSER_ROOT_VERSION=2.0.x-dev
|
||||
- COMPOSER_ROOT_VERSION=2.x-dev
|
||||
- TRAVIS_NODE_VERSION="6"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.6
|
||||
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
|
||||
- php: 7.0
|
||||
env: DB=PGSQL PHPUNIT_TEST=1
|
||||
- php: 7.1
|
||||
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
|
||||
- php: 7.1
|
||||
env: DB=MYSQL NPM_TEST=1
|
||||
- php: 7.2
|
||||
env: DB=PGSQL PHPUNIT_TEST=1
|
||||
- php: 7.3
|
||||
env: DB=MYSQL PHPUNIT_TEST=1NPM_TEST=1
|
||||
- php: 7.4
|
||||
env: DB=MYSQL PHPUNIT_TEST=1 NPM_TEST=1
|
||||
|
||||
before_script:
|
||||
- phpenv rehash
|
||||
- phpenv config-rm xdebug.ini
|
||||
|
||||
- composer validate
|
||||
- composer require --no-update silverstripe/recipe-cms:4.3.x-dev silverstripe/admin:1.3.x-dev
|
||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev; fi
|
||||
- composer require --no-update silverstripe/recipe-cms:^4
|
||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2; fi
|
||||
- composer require --no-update sminnee/phpunit-mock-objects:^3
|
||||
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||
|
||||
# Install NPM dependencies
|
||||
|
@ -525,6 +525,8 @@ class TagField extends MultiSelectField
|
||||
/** @var ReadonlyTagField $copy */
|
||||
$copy = $this->castedCopy(ReadonlyTagField::class);
|
||||
$copy->setSourceList($this->getSourceList());
|
||||
$copy->setTitleField($this->getTitleField());
|
||||
|
||||
return $copy;
|
||||
}
|
||||
|
||||
|
@ -352,6 +352,12 @@ class TagFieldTest extends SapphireTest
|
||||
$field = new TagField('Tags', '', TagFieldTestBlogTag::get());
|
||||
$readOnlyField = $field->performReadonlyTransformation();
|
||||
$this->assertInstanceOf(ReadonlyTagField::class, $readOnlyField);
|
||||
|
||||
// Custom title field
|
||||
$field = new TagField('Tags', '', TagFieldTestBlogTag::get());
|
||||
$field->setTitleField('Name');
|
||||
$readOnlyField = $field->performReadonlyTransformation();
|
||||
$this->assertEquals('Name', $readOnlyField->getTitleField());
|
||||
}
|
||||
|
||||
public function testGetSchemaDataDefaults()
|
||||
|
Loading…
Reference in New Issue
Block a user