Skip to content
Permalink
Browse files

Infection - limit mutators

  • Loading branch information...
kubawerlos committed Oct 19, 2019
1 parent c9af0c0 commit 51d29bbf43a3481b048bb469b0cb68163f31e877
@@ -8,7 +8,7 @@

[![Build status](https://img.shields.io/travis/kubawerlos/php-cs-fixer-custom-fixers/master.svg)](https://travis-ci.org/kubawerlos/php-cs-fixer-custom-fixers)
[![Code coverage](https://img.shields.io/coveralls/github/kubawerlos/php-cs-fixer-custom-fixers/master.svg)](https://coveralls.io/github/kubawerlos/php-cs-fixer-custom-fixers?branch=master)
![Tests](https://img.shields.io/badge/tests-1242-brightgreen.svg)
![Tests](https://img.shields.io/badge/tests-1243-brightgreen.svg)
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/kubawerlos/php-cs-fixer-custom-fixers/master)](https://stryker-mutator.github.io)
[![Psalm type coverage](https://shepherd.dev/github/kubawerlos/php-cs-fixer-custom-fixers/coverage.svg)](https://shepherd.dev/github/kubawerlos/php-cs-fixer-custom-fixers)

@@ -1,4 +1,5 @@
{
"$schema": "./dev-tools/vendor/infection/infection/resources/schema.json",
"source": {
"directories": [
"./src",
@@ -27,10 +28,31 @@
"PhpCsFixerCustomFixers\\Fixer\\*::isCandidate"
]
},
"Assignment": false,
"Decrement": false,
"DecrementInteger": false,
"FalseValue": false,
"For_": false,
"GreaterThan": false,
"GreaterThanOrEqualTo": false,
"Increment": false,
"IncrementInteger": false,
"IntegerNegation": false,
"LessThan": false,
"LessThanOrEqualTo": false,
"LessThanOrEqualToNegotiation": false,
"LogicalAnd": false,
"LogicalNot": false,
"LogicalOr": false,
"Minus": false,
"NotIdentical": false,
"OneZeroInteger": false,
"Plus": false,
"PublicVisibility": {
"ignore": [
"PhpCsFixerCustomFixers\\Fixer\\AbstractFixer::name"
]
}
},
"TrueValue": false
}
}
@@ -22,6 +22,7 @@ public function testForNotSwitch(): void
$analyzer = new SwitchAnalyzer();
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Index 3 is not "switch".');
$analyzer->getSwitchAnalysis(Tokens::fromCode('<?php $a;$b;$c;'), 3);
}
@@ -53,7 +53,13 @@ class FooTest extends TestCase {
* @dataProvider provideFooCases
*/
public function testFoo() {}
/**
* @dataProvider provider
*/
public function testBar() {}
public function provideFooCases()%s {}
public function provider()%s {}
public function notProvider(): array {}
}';
$cases = [
@@ -73,6 +79,10 @@ public function provideFooCases()%s {}
': iterable',
': Foo\Bar',
],
'data provider with return type namespaced class starting with iterable' => [
': iterable',
': iterable \ Foo',
],
'data provider with return type namespaced class and comments' => [
': iterable',
': Foo/* Some info */\/* More info */Bar',
@@ -86,7 +96,7 @@ public function provideFooCases()%s {}
foreach ($cases as $key => $case) {
yield $key => \array_map(
static function (string $code) use ($template): string {
return \sprintf($template, $code);
return \sprintf($template, $code, $code);
},
$case
);
@@ -49,9 +49,11 @@ public function provideFixCases(): iterable
yield [
'<?php
',
'<?php
/** @var string */
/** @author John Doe */
',
];
@@ -21,6 +21,7 @@ public function testReadmeIsUpToDate(): void
$tester->execute([]);
static::assertSame(0, $tester->getStatusCode());
static::assertStringEqualsFile(
__DIR__ . '/../../README.md',
$tester->getDisplay()

0 comments on commit 51d29bb

Please sign in to comment.
You can’t perform that action at this time.