/**
* @dataProvider provideDataForToleratesForGroup
*/
public function testToleratesForIndividualGroups(string
$deprecationsHelper, array
$deprecationsPerType, array
$expected) { $configuration = Configuration::
fromUrlEncodedString($deprecationsHelper);
$groups =
$this->
buildGroups($deprecationsPerType);
foreach ($expected as $groupName =>
$tolerates) { $this->
assertSame($tolerates,
$configuration->
toleratesForGroup($groupName,
$groups),
sprintf('Deprecation type "%s" is %s',
$groupName,
$tolerates ? 'tolerated' : 'not tolerated'
));
} } public static function provideDataForToleratesForGroup() { yield 'total threshold not reached' =>
['max[total]=1',
[ 'unsilenced' => 0,
'self' => 0,
'legacy' => 1, // Legacy group is ignored in total threshold
'other' => 0,
'direct' => 1,