Skip to content

Commit

Permalink
[BUGFIX] partially satisfy psalm, updating baseline
Browse files Browse the repository at this point in the history
This commit satisfies the NonStaticSelfCall identified in tests/Support/Traits/AssertCss.php

regarding: #537
  • Loading branch information
SignpostMarv committed Oct 2, 2019
1 parent 21707e2 commit 7d7a528
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions psalm.baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
<code>removeAttribute</code>
</UndefinedMethod>
</file>
<file src="tests\Support\Traits\AssertCss.php">
<NonStaticSelfCall occurrences="1"/>
</file>
<file src="tests\Unit\CssInlinerTest.php">
<PossiblyNullArgument occurrences="1">
<code>$styleElement</code>
Expand Down
4 changes: 2 additions & 2 deletions tests/Support/Traits/AssertCss.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ private static function assertNotContainsCss(string $needle, string $haystack)
* @param string $needle
* @param string $haystack
*/
private static function assertContainsCssCount(
private function assertContainsCssCount(
int $expectedCount,
string $needle,
string $haystack
) {
self::assertSame(
$this->assertSame(

This comment has been minimized.

Copy link
@oliverklee

oliverklee Oct 3, 2019

Contributor

assertSame is a static method and should be called in a static way (at least in this project; other projects might follow a different policy):
https://github.com/sebastianbergmann/phpunit/blob/master/src/Framework/Assert.php#L1579

$expectedCount,
\preg_match_all(self::getCssNeedleRegExp($needle), $haystack),
'Plain text needle: "' . $needle . "\"\nHaystack: \"" . $haystack . '"'
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/CssInlinerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,7 @@ public function multiLineMediaQueryWithWindowsLineEndingsIsAppliedOnlyOnce()

$subject->inlineCss($css);

self::assertContainsCssCount(1, $css, $subject->render());
$this->assertContainsCssCount(1, $css, $subject->render());
}

/**
Expand All @@ -2789,7 +2789,7 @@ public function multiLineMediaQueryWithUnixLineEndingsIsAppliedOnlyOnce()

$subject->inlineCss($css);

self::assertContainsCssCount(1, $css, $subject->render());
$this->assertContainsCssCount(1, $css, $subject->render());
}

/**
Expand All @@ -2814,7 +2814,7 @@ public function multipleMediaQueriesAreAppliedOnlyOnce()

$subject->inlineCss($css);

self::assertContainsCssCount(1, $css, $subject->render());
$this->assertContainsCssCount(1, $css, $subject->render());
}

/**
Expand Down

0 comments on commit 7d7a528

Please sign in to comment.