Skip to content

Commit

Permalink
[TASK] Make MethodArgumentDroppedStaticMatcherTest notice free
Browse files Browse the repository at this point in the history
Releases: master
Resolves: #84315
Change-Id: I6bb30f6289d5c5a9e5c36f21ab89cf4b84b5bad7
Reviewed-on: https://review.typo3.org/56188
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
janhelke authored and lolli42 committed Mar 15, 2018
1 parent 0f722b5 commit 96928bb
Showing 1 changed file with 9 additions and 7 deletions.
Expand Up @@ -26,11 +26,6 @@
*/
class MethodArgumentDroppedStaticMatcherTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;

/**
* @test
*/
Expand Down Expand Up @@ -70,7 +65,7 @@ public function hitsFromFixtureAreFound()
/**
* @return array
*/
public function matchesReturnsExpectedRestFilesDataProvider()
public function matchesReturnsExpectedRestFilesDataProvider(): array
{
return [
'two rest candidates with same number of arguments' => [
Expand Down Expand Up @@ -234,6 +229,9 @@ public function matchesReturnsExpectedRestFilesDataProvider()
/**
* @test
* @dataProvider matchesReturnsExpectedRestFilesDataProvider
* @param array $configuration
* @param string $phpCode
* @param array $expected
*/
public function matchesReturnsExpectedRestFiles(array $configuration, string $phpCode, array $expected)
{
Expand All @@ -247,6 +245,10 @@ public function matchesReturnsExpectedRestFiles(array $configuration, string $ph
$traverser->traverse($statements);

$result = $subject->getMatches();
$this->assertEquals($expected[0]['restFiles'], $result[0]['restFiles']);
if (isset($expected[0], $result[0])) {
$this->assertEquals($expected[0]['restFiles'], $result[0]['restFiles']);
} else {
$this->assertEquals($expected, $result);
}
}
}

0 comments on commit 96928bb

Please sign in to comment.