/**
* @dataProvider mutedProvider
*/
public function testItMutesOnlySpecificErrorMessagesWhenTheCallingCodeIsInPhpunit($muted,
$callingClass,
$message) { $trace =
$this->
debugBacktrace();
array_unshift($trace,
['class' =>
$callingClass]);
array_unshift($trace,
['class' => DeprecationErrorHandler::
class]);
$deprecation =
new Deprecation($message,
$trace, 'should_not_matter.php'
);
$this->
assertSame($muted,
$deprecation->
isMuted());
} public static function mutedProvider() { yield 'not from phpunit, and not a whitelisted message' =>
[ false,
\My\Source\Code::
class,
'Self deprecating humor is deprecated by itself',
];
yield 'from phpunit, but not a whitelisted message' =>
[ false,