'lhs_module', 'lhs_label' => 'lhs_label' ); $activitiesRelationship = new ActivitiesRelationship($definition); $actual = $activitiesRelationship->buildLabels(); foreach($actual as $item) { if (isset($item['display_label']) == false) { continue; } if (is_array($item['display_label'])) { if (isset($item['display_label'][$definition['lhs_module']])) { $this->assertEquals($definition['lhs_label'], $item['display_label'][$definition['lhs_module']], 'Label is missed'); } } else { $this->assertEquals($definition['lhs_label'], $item['display_label'], 'Label is missed'); } } } }