-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathResultTypeTest.php
More file actions
103 lines (84 loc) · 3.05 KB
/
ResultTypeTest.php
File metadata and controls
103 lines (84 loc) · 3.05 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
<?php
declare(strict_types=1);
namespace Qameta\Allure\Test\Model;
use PHPUnit\Framework\TestCase;
use Qameta\Allure\Model\ResultType;
/**
* @covers \Qameta\Allure\Model\ResultType
* @covers \Qameta\Allure\Model\AbstractEnum
*/
class ResultTypeTest extends TestCase
{
public function testUnknown_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::unknown();
self::assertSame($resultType, ResultType::unknown());
}
public function testUnknown_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('unknown', (string) ResultType::unknown());
}
public function testContainer_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::container();
self::assertSame($resultType, ResultType::container());
}
public function testContainer_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('container', (string) ResultType::container());
}
public function testFixture_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::fixture();
self::assertSame($resultType, ResultType::fixture());
}
public function testFixture_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('fixture', (string) ResultType::fixture());
}
public function testTest_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::test();
self::assertSame($resultType, ResultType::test());
}
public function testTest_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('test', (string) ResultType::test());
}
public function testStep_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::step();
self::assertSame($resultType, ResultType::step());
}
public function testStep_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('step', (string) ResultType::step());
}
public function testAttachment_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::step();
self::assertSame($resultType, ResultType::step());
}
public function testAttachment_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('attachment', (string) ResultType::attachment());
}
public function testExecutableContext_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::executableContext();
self::assertSame($resultType, ResultType::executableContext());
}
public function testExecutableContext_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('executable_context', (string) ResultType::executableContext());
}
public function testGlobals_CalledTwice_ReturnsSameInstance(): void
{
$resultType = ResultType::globals();
self::assertSame($resultType, ResultType::globals());
}
public function testGlobals_CastedToString_ReturnsMatchingValue(): void
{
self::assertSame('globals', (string) ResultType::globals());
}
}