File tree Expand file tree Collapse file tree 4 files changed +7
-12
lines changed
TextUI/Output/Default/ProgressPrinter
tests/unit/Event/Value/Test Expand file tree Collapse file tree 4 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,6 @@ public function isTest(): true
24
24
return true ;
25
25
}
26
26
27
- /**
28
- * Your own code triggers an issue in your own code.
29
- */
30
- public function isSelf (): true
31
- {
32
- return true ;
33
- }
34
-
35
27
public function asString (): string
36
28
{
37
29
return 'issue triggered by test code ' ;
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ public function shouldBeProcessed(DeprecationTriggered|ErrorTriggered|NoticeTrig
44
44
return false ;
45
45
}
46
46
47
- if ($ this ->source ->ignoreSelfDeprecations () && $ event ->trigger ()->isSelf ()) {
47
+ if ($ this ->source ->ignoreSelfDeprecations () &&
48
+ ($ event ->trigger ()->isTest () || $ event ->trigger ()->isSelf ())) {
48
49
return false ;
49
50
}
50
51
Original file line number Diff line number Diff line change @@ -141,7 +141,8 @@ public function testTriggeredDeprecation(DeprecationTriggered $event): void
141
141
return ;
142
142
}
143
143
144
- if ($ this ->source ->ignoreSelfDeprecations () && $ event ->trigger ()->isSelf ()) {
144
+ if ($ this ->source ->ignoreSelfDeprecations () &&
145
+ ($ event ->trigger ()->isTest () || $ event ->trigger ()->isSelf ())) {
145
146
return ;
146
147
}
147
148
@@ -171,7 +172,8 @@ public function testTriggeredPhpDeprecation(PhpDeprecationTriggered $event): voi
171
172
return ;
172
173
}
173
174
174
- if ($ this ->source ->ignoreSelfDeprecations () && $ event ->trigger ()->isSelf ()) {
175
+ if ($ this ->source ->ignoreSelfDeprecations () &&
176
+ ($ event ->trigger ()->isTest () || $ event ->trigger ()->isSelf ())) {
175
177
return ;
176
178
}
177
179
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function testCanBeTest(): void
26
26
$ trigger = IssueTrigger::test ();
27
27
28
28
$ this ->assertTrue ($ trigger ->isTest ());
29
- $ this ->assertTrue ($ trigger ->isSelf ());
29
+ $ this ->assertFalse ($ trigger ->isSelf ());
30
30
$ this ->assertFalse ($ trigger ->isDirect ());
31
31
$ this ->assertFalse ($ trigger ->isIndirect ());
32
32
$ this ->assertFalse ($ trigger ->isUnknown ());
You can’t perform that action at this time.
0 commit comments