Skip to content

Commit 8a3bfa0

Browse files
committed
Ignore the fallbacks for legacy PHPUnit methods when calculating code coverage
1 parent 195b8bb commit 8a3bfa0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
*.DS_Store
2-
tests/coverage
3-
vendor
42
.phpunit.result.cache
53
.vscode
4+
tests/coverage
5+
vendor
66

77
# The composer.lock file is not needed, as this is a library whose dependencies
88
# will depend on the version of PHP being used.

src/MarkupAssertionsTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function assertElementContains($contents, $selector = '', $markup = '', $
128128
{
129129
$method = method_exists($this, 'assertStringContainsString')
130130
? 'assertStringContainsString'
131-
: 'assertContains';
131+
: 'assertContains'; // @codeCoverageIgnore
132132

133133
$this->$method(
134134
$contents,
@@ -153,7 +153,7 @@ public function assertElementNotContains($contents, $selector = '', $markup = ''
153153
{
154154
$method = method_exists($this, 'assertStringNotContainsString')
155155
? 'assertStringNotContainsString'
156-
: 'assertNotContains';
156+
: 'assertNotContains'; // @codeCoverageIgnore
157157

158158
$this->$method(
159159
$contents,
@@ -178,7 +178,7 @@ public function assertElementRegExp($regexp, $selector = '', $markup = '', $mess
178178
{
179179
$method = method_exists($this, 'assertMatchesRegularExpression')
180180
? 'assertMatchesRegularExpression'
181-
: 'assertRegExp';
181+
: 'assertRegExp'; // @codeCoverageIgnore
182182

183183
$this->$method(
184184
$regexp,
@@ -203,7 +203,7 @@ public function assertElementNotRegExp($regexp, $selector = '', $markup = '', $m
203203
{
204204
$method = method_exists($this, 'assertDoesNotMatchRegularExpression')
205205
? 'assertDoesNotMatchRegularExpression'
206-
: 'assertNotRegExp';
206+
: 'assertNotRegExp'; // @codeCoverageIgnore
207207

208208
$this->$method(
209209
$regexp,

0 commit comments

Comments
 (0)