From ab26bf6f532b2b6e7ac9d0052c0cc31786c1a123 Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Fri, 16 Feb 2018 17:16:45 -0200 Subject: [PATCH] fix api metadata test --- tests/test-api-metadata.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-api-metadata.php b/tests/test-api-metadata.php index e80130f99..d3664b2a2 100644 --- a/tests/test-api-metadata.php +++ b/tests/test-api-metadata.php @@ -98,9 +98,9 @@ class TAINACAN_REST_Metadata_Controller extends TAINACAN_UnitApiTestCase { $data = $response->get_data(); - $field = $data[0]; + $fields_names = array_map(function($field) {return $field['name'];}, $data); - $this->assertEquals('Data', $field['name']); + $this->assertContains('Data', $fields_names); ################### Get field of item with value #######################