Skip to content

Commit

Permalink
EZP-24800 Support allowed classes limitation for object relation fiel…
Browse files Browse the repository at this point in the history
…ds (#2022)

* EZP-24800 Support allowed classes limitation for object relation fields

* EZP-24800 code style fixes
  • Loading branch information
slaci authored and andrerom committed Jul 31, 2017
1 parent 6a2976f commit 078af06
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions Repository/Tests/FieldType/RelationIntegrationTest.php
Expand Up @@ -80,16 +80,20 @@ public function getUpdateExpectedRelations(Content $content)
*/
public function getSettingsSchema()
{
return array(
'selectionMethod' => array(
return [
'selectionMethod' => [
'type' => 'int',
'default' => 0,
),
'selectionRoot' => array(
],
'selectionRoot' => [
'type' => 'string',
'default' => '',
),
);
'default' => null,
],
'selectionContentTypes' => [
'type' => 'array',
'default' => [],
],
];
}

/**
Expand All @@ -109,7 +113,11 @@ public function getValidatorSchema()
*/
public function getValidFieldSettings()
{
return array('selectionMethod' => 0, 'selectionRoot' => '1');
return [
'selectionMethod' => 0,
'selectionRoot' => '1',
'selectionContentTypes' => ['blog_post'],
];
}

/**
Expand All @@ -133,7 +141,12 @@ public function getValidValidatorConfiguration()
*/
public function getInvalidFieldSettings()
{
return array('selectionMethod' => 'a', 'selectionRoot' => true, 'unknownSetting' => false);
return [
'selectionMethod' => 'a',
'selectionRoot' => true,
'unknownSetting' => false,
'selectionContentTypes' => true,
];
}

/**
Expand Down

0 comments on commit 078af06

Please sign in to comment.