protected function gatherMetaData($test)
    {
        $metadata = array(
            // Default tags from config
            'tags' => isset($this->config['tags']) ? explode(",", $this->config['tags']) : array(),
            // Default custom data is empty
            'custom-data' => array(),
        );

        // Tag with the current test string reference
        $metadata['tags'][] = "test:" . $test->toString();

        // Add codeception runtime options to custom-data
        $metadata['custom-data']['options'] = $this->options;

        return $metadata;
    }