@@ -22,18 +22,30 @@ public function testPrintWithoutConfig(): void
22
22
$ this ->assertMatchesSnapshot (implode (PHP_EOL , $ out ), new SnapshotTextDriver ());
23
23
}
24
24
25
- public function testPrintWithMethodNameConversion (): void
25
+ public function testPrettifyMethodNames (): void
26
26
{
27
27
$ command = [
28
28
'vendor/bin/phpunit ' ,
29
- '--configuration=tests/phpunit.test-with -method-name-conversion .xml ' ,
29
+ '--configuration=tests/phpunit.test-prettify -method-names .xml ' ,
30
30
'--no-output ' ,
31
31
];
32
32
33
33
exec (implode (' ' , $ command ), $ out );
34
34
$ this ->assertMatchesSnapshot (implode (PHP_EOL , $ out ), new SnapshotTextDriver ());
35
35
}
36
36
37
+ public function testPrettifyMethodNamesAtRunTime (): void
38
+ {
39
+ $ command = [
40
+ 'vendor/bin/phpunit ' ,
41
+ '--configuration=tests/phpunit.test.xml ' ,
42
+ '--no-output ' ,
43
+ '-d --prettify-method-names ' ,
44
+ ];
45
+ exec (implode (' ' , $ command ), $ out );
46
+ $ this ->assertMatchesSnapshot (implode (PHP_EOL , $ out ), new SnapshotTextDriver ());
47
+ }
48
+
37
49
public function testPrintCompactMode (): void
38
50
{
39
51
$ command = [
@@ -46,7 +58,19 @@ public function testPrintCompactMode(): void
46
58
$ this ->assertMatchesSnapshot (implode (PHP_EOL , $ out ), new SnapshotTextDriver ());
47
59
}
48
60
49
- public function testPrintWithQuotes (): void
61
+ public function testPrintCompactModeAtRunTime (): void
62
+ {
63
+ $ command = [
64
+ 'vendor/bin/phpunit ' ,
65
+ '--configuration=tests/phpunit.test.xml ' ,
66
+ '--no-output ' ,
67
+ '-d --compact ' ,
68
+ ];
69
+ exec (implode (' ' , $ command ), $ out );
70
+ $ this ->assertMatchesSnapshot (implode (PHP_EOL , $ out ), new SnapshotTextDriver ());
71
+ }
72
+
73
+ public function testPrintWithQuote (): void
50
74
{
51
75
$ command = [
52
76
'vendor/bin/phpunit ' ,
@@ -73,11 +97,39 @@ public function testPrintWithQuotes(): void
73
97
}
74
98
}
75
99
100
+ public function testPrintWithQuoteAtRuntime (): void
101
+ {
102
+ $ command = [
103
+ 'vendor/bin/phpunit ' ,
104
+ '--configuration=tests/phpunit.test.xml ' ,
105
+ '--no-output ' ,
106
+ '-d --display-quote ' ,
107
+ ];
108
+
109
+ exec (implode (' ' , $ command ), $ out );
110
+
111
+ $ print = implode (PHP_EOL , $ out );
112
+
113
+ $ printContainsQuote = false ;
114
+ foreach (Quotes::getAll () as $ quote ) {
115
+ if (!str_contains ($ print , $ quote )) {
116
+ continue ;
117
+ }
118
+
119
+ $ printContainsQuote = true ;
120
+ $ this ->addToAssertionCount (1 );
121
+ }
122
+
123
+ if (!$ printContainsQuote ) {
124
+ $ this ->fail ('Quote not found ' );
125
+ }
126
+ }
127
+
76
128
public function testPrintWhenNoOutputArgumentIsProvided (): void
77
129
{
78
130
$ command = [
79
131
'vendor/bin/phpunit ' ,
80
- '--configuration=tests/phpunit.test-with -method-name-conversion .xml ' ,
132
+ '--configuration=tests/phpunit.test-prettify -method-names .xml ' ,
81
133
];
82
134
83
135
exec (implode (' ' , $ command ), $ out );
0 commit comments