-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathActionGroupAnnotationExtractor.php
37 lines (32 loc) · 1.11 KB
/
ActionGroupAnnotationExtractor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\FunctionalTestingFramework\Test\Util;
use Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil;
/**
* Class AnnotationExtractor
*/
class ActionGroupAnnotationExtractor extends AnnotationExtractor
{
/**
* This method trims away irrelevant tags and returns annotations used in the array passed. The annotations
* can be found in both Tests and their child element tests.
*
* @param array $testAnnotations
* @param string $filename
* @param boolean $validateAnnotations
* @return array
* @throws \Exception
*/
public function extractAnnotations($testAnnotations, $filename, $validateAnnotations = true)
{
$annotationObjects = [];
$annotations = $this->stripDescriptorTags($testAnnotations, parent::NODE_NAME);
foreach ($annotations as $annotationKey => $annotationData) {
$annotationObjects[$annotationKey] = $annotationData[parent::ANNOTATION_VALUE];
}
return $annotationObjects;
}
}