check if is visible for api (show_ui)

This commit is contained in:
Jacson Passold 2018-07-05 22:17:41 -03:00
parent 8b32f6f0e6
commit 7d38dc1cf2
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ class TAINACAN_REST_Metadatum_Mappers_Controller extends TAINACAN_UnitApiTestCas
$Tainacan_Metadata = \Tainacan\Exposers\Exposers::get_instance(); $Tainacan_Metadata = \Tainacan\Exposers\Exposers::get_instance();
$metadatum_mappers = $Tainacan_Metadata->get_mappers("OBJECT"); $metadatum_mappers = $Tainacan_Metadata->get_mappers("OBJECT");
/** @var \Tainacan\Exposers\Mappers\Mapper $metadatum_mapper **/
foreach ($metadatum_mappers as $k => $metadatum_mapper) {
if(!$metadatum_mapper->show_ui) unset($metadatum_mappers[$k]);
}
$this->assertEquals(count($metadatum_mappers), count($data)); $this->assertEquals(count($metadatum_mappers), count($data));