Fixes set thumbnail

This commit is contained in:
weryques 2018-03-13 13:47:31 -03:00
parent f3f0079112
commit 429a5587c4
3 changed files with 12 additions and 8 deletions

View File

@ -124,7 +124,7 @@ class Collection extends Entity {
/**
* @param $id
*/
function set_featured_img_by_id($id){
function set_featured_img_id($id){
$this->set_mapped_property('featured_image_id', $id );
}

View File

@ -52,7 +52,7 @@ class Item extends Entity {
/**
* @param $id
*/
function set_featured_img_by_id($id){
function set_featured_img_id($id){
$this->set_mapped_property('featured_image_id', $id );
}

View File

@ -188,8 +188,10 @@ class TAINACAN_REST_Terms_Controller extends TAINACAN_UnitApiTestCase {
array(
'name' => 'Field filtered',
'description' => 'Is filtered',
'collection_id' => $collection->get_id()
)
'collection_id' => $collection->get_id(),
'field_type' => 'Tainacan\Field_Types\Numeric'
),
true
);
$field2 = $this->tainacan_entity_factory->create_entity(
@ -197,8 +199,10 @@ class TAINACAN_REST_Terms_Controller extends TAINACAN_UnitApiTestCase {
array(
'name' => 'Other filtered',
'description' => 'Is filtered',
'collection_id' => $collection->get_id()
)
'collection_id' => $collection->get_id(),
'field_type' => 'Tainacan\Field_Types\Numeric'
),
true
);
$filter_type = $this->tainacan_filter_factory->create_filter('custom_interval');
@ -209,7 +213,7 @@ class TAINACAN_REST_Terms_Controller extends TAINACAN_UnitApiTestCase {
'name' => 'filtro',
'collection' => $collection,
'description' => 'descricao',
'field' => $field,
'field' => $field,
'filter_type' => $filter_type,
'status' => 'publish'
),
@ -222,7 +226,7 @@ class TAINACAN_REST_Terms_Controller extends TAINACAN_UnitApiTestCase {
'name' => 'filtro2',
'collection' => $collection,
'description' => 'descricao',
'field' => $field2,
'field' => $field2,
'filter_type' => $filter_type,
'status' => 'publish'
),