-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathAnnotationTest.php
More file actions
152 lines (134 loc) · 4.38 KB
/
Copy pathAnnotationTest.php
File metadata and controls
152 lines (134 loc) · 4.38 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
declare(strict_types=1);
namespace Qameta\Allure\PHPUnit\Test\Report\Generate;
use PHPUnit\Framework\TestCase;
use Qameta\Allure\Attribute;
use Yandex\Allure\Adapter\Annotation\Description;
use Yandex\Allure\Adapter\Annotation\Features;
use Yandex\Allure\Adapter\Annotation\Parameter;
use Yandex\Allure\Adapter\Annotation\Severity;
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Model\DescriptionType;
use Yandex\Allure\Adapter\Model\ParameterKind;
use Yandex\Allure\Adapter\Model\SeverityLevel;
final class AnnotationTest extends TestCase
{
/**
* @Description ("Legacy description with `markdown`", type = DescriptionType::MARKDOWN)
*/
#[Attribute\DisplayName('Legacy description annotation is reported as test description')]
public function testLegacyDescriptionAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
#[
Attribute\DisplayName('Native description annotation is reported as test description'),
Attribute\Description('Test native description with `markdown`'),
]
public function testNativeDescriptionAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Description ("Test legacy description with `markdown`", type = DescriptionType::MARKDOWN)
*/
#[Attribute\Description('Test native description with <b>HTML</b>', true)]
public function testMixedDescriptionAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Severity (level = SeverityLevel::MINOR)
*/
#[Attribute\DisplayName('Legacy severity annotation is reported as test severity')]
public function testLegacySeverityAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
#[
Attribute\DisplayName('Native severity annotation is reported as test severity'),
Attribute\Severity(Attribute\Severity::CRITICAL),
]
public function testNativeSeverityAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Severity (level = SeverityLevel::MINOR)
*/
#[
Attribute\DisplayName('Legacy severity annotation overrides native one'),
Attribute\Severity(Attribute\Severity::CRITICAL),
]
public function testMixedSeverityAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Parameter (name = "foo", value = "legacy foo")
*/
#[Attribute\DisplayName('Legacy parameter')]
public function testLegacyParameterAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
#[Attribute\Parameter('foo', 'native foo')]
#[Attribute\Parameter('bar', 'native bar')]
public function testNativeParameterAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Parameter (name = "foo", value = "legacy bar", kind = ParameterKind::ARGUMENT)
*/
#[Attribute\Parameter('foo', 'native foo')]
#[Attribute\Parameter('bar', 'native baz')]
public function testMixedParameterAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Stories ("Legacy story 1", "Legacy story 2")
*/
public function testLegacyStoriesAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
#[Attribute\Story('Native story 1')]
#[Attribute\Story('Native story 2')]
public function testNativeStoriesAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Stories ("Legacy story 1", "Mixed story 2")
*/
#[Attribute\Story('Native story 1')]
#[Attribute\Story('Mixed story 2')]
public function testMixedStoriesAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Features ("Legacy feature 1", "Legacy feature 2")
*/
public function testLegacyFeaturesAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
#[Attribute\Feature('Native feature 1')]
#[Attribute\Feature('Native feature 2')]
public function testNativeFeaturesAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
/**
* @Features ("Legacy feature 1", "Mixed feature 2")
*/
#[Attribute\Feature('Native feature 1')]
#[Attribute\Feature('Mixed feature 2')]
public function testMixedFeaturesAnnotation(): void
{
$this->expectNotToPerformAssertions();
}
}