public function responseHasFollowingContentTypeGroups(TableNode $table) { // get groups $groups = GherkinHelper::convertTableToArrayOfData($table); // verify if the expects objects are in the list foreach ($this->getResponseObject() as $ContentTypeGroup) { $found = array_search($ContentTypeGroup->identifier, $groups); if ($found !== false) { unset($groups[$found]); } } // verify if all the expected groups were found Assertion::assertEmpty($groups, "Expected to find all groups but couldn't find: " . print_r($groups, true)); }