Updates some tests and the fetch_metadata_type function to do not return control metadata
This commit is contained in:
parent
3a83a8d0ae
commit
d9da6bae70
|
@ -653,7 +653,7 @@ class Metadata extends Repository {
|
|||
|
||||
do_action( 'register_metadata_types' );
|
||||
|
||||
return array_filter($this->metadata_types, function($metadata_type) {
|
||||
return array_filter($this->metadata_types, function($metadata_type) use ($output) {
|
||||
if ( $metadata_type != 'Tainacan\Metadata_Types\Control') {
|
||||
return $output === 'NAME' ? str_replace( 'Tainacan\Metadata_Types\\', '', $metadata_type ) : $metadata_type;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ class TAINACAN_REST_Metadata_Controller extends TAINACAN_UnitApiTestCase {
|
|||
|
||||
$data = $response_defaults->get_data();
|
||||
|
||||
$this->assertCount(1, $data);
|
||||
$this->assertCount(3, $data);
|
||||
|
||||
$this->assertEquals('default', $data[0]['collection_id']);
|
||||
$this->assertEquals('Data 2', $data[0]['name']);
|
||||
|
|
Loading…
Reference in New Issue