*/
class MethodCallMatcherTest extends UnitTestCase
{
- /**
- * Subject is not notice free, disable E_NOTICES
- */
- protected static $suppressNotices = true;
-
/**
* @test
*/
/**
* @return array
*/
- public function matchesReturnsExpectedRestFilesDataProvider()
+ public function matchesReturnsExpectedRestFilesDataProvider(): array
{
return [
'two rest candidates with same number of arguments' => [
/**
* @test
* @dataProvider matchesReturnsExpectedRestFilesDataProvider
+ * @param array $configuration
+ * @param string $phpCode
+ * @param array $expected
*/
public function matchesReturnsExpectedRestFiles(array $configuration, string $phpCode, array $expected)
{
$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);
+ }
}
}