-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathSuiteProvider.php
More file actions
90 lines (77 loc) · 1.97 KB
/
Copy pathSuiteProvider.php
File metadata and controls
90 lines (77 loc) · 1.97 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
declare(strict_types=1);
namespace Qameta\Allure\Codeception\Internal;
use Qameta\Allure\Attribute\AttributeParser;
use Qameta\Allure\Setup\LinkTemplateCollectionInterface;
use Qameta\Allure\Model\Label;
use Qameta\Allure\Model\ModelProviderInterface;
use ReflectionException;
/**
* @internal
*/
final class SuiteProvider implements ModelProviderInterface
{
public function __construct(
private ?SuiteInfo $suiteInfo,
) {
}
/**
* @param SuiteInfo|null $suiteInfo
* @param LinkTemplateCollectionInterface $linkTemplates
* @return list<ModelProviderInterface>
* @throws ReflectionException
*/
public static function createForChain(
?SuiteInfo $suiteInfo,
LinkTemplateCollectionInterface $linkTemplates,
): array {
$providers = [new self($suiteInfo)];
$suiteClass = $suiteInfo?->getClass();
return isset($suiteClass)
? [
...$providers,
...AttributeParser::createForChain(classOrObject: $suiteClass, linkTemplates: $linkTemplates),
]
: $providers;
}
#[\Override]
public function getLinks(): array
{
return [];
}
#[\Override]
public function getLabels(): array
{
return [
Label::language(null),
Label::framework('codeception'),
Label::parentSuite($this->suiteInfo?->getName()),
Label::package($this->suiteInfo?->getName()),
];
}
#[\Override]
public function getParameters(): array
{
return [];
}
#[\Override]
public function getDisplayName(): ?string
{
return null;
}
#[\Override]
public function getDescription(): ?string
{
return null;
}
#[\Override]
public function getDescriptionHtml(): ?string
{
return null;
}
#[\Override]
public function getFullName(): ?string
{
return null;
}
}