-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c28aa74
commit dbe9158
Showing
11 changed files
with
434 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
]) | ||
->append([ | ||
__FILE__, | ||
'bin/build-infection', | ||
'bin/parallel-phpunit', | ||
'bin/prune-cache', | ||
]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the Nexus framework. | ||
* | ||
* (c) John Paul E. Balandan, CPA <[email protected]> | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
require __DIR__.'/../tools/build-infection.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
{ | ||
"$schema": "./tools/vendor/infection/infection/resources/schema.json", | ||
"source": { | ||
"directories": [ | ||
"src/Nexus" | ||
], | ||
"excludes": [ | ||
"PHPStan" | ||
] | ||
}, | ||
"timeout": 10, | ||
"logs": { | ||
"text": "build/logs/infection/infection.log", | ||
"html": "build/logs/infection/infection.html", | ||
"stryker": { | ||
"badge": "1.x" | ||
} | ||
}, | ||
"tmpDir": "build", | ||
"minMsi": 100, | ||
"minCoveredMsi": 100, | ||
"mutators": { | ||
"ArrayItem": true, | ||
"ArrayItemRemoval": true, | ||
"ArrayOneItem": true, | ||
"AssignCoalesce": true, | ||
"Assignment": true, | ||
"AssignmentEqual": true, | ||
"BCMath": true, | ||
"BitwiseAnd": true, | ||
"BitwiseNot": true, | ||
"BitwiseOr": true, | ||
"BitwiseXor": true, | ||
"Break_": true, | ||
"CastArray": true, | ||
"CastBool": true, | ||
"CastFloat": true, | ||
"CastInt": { | ||
"ignore": [ | ||
"Nexus\\Clock\\SystemClock" | ||
] | ||
}, | ||
"CastObject": true, | ||
"CastString": true, | ||
"CatchBlockRemoval": true, | ||
"Catch_": true, | ||
"CloneRemoval": true, | ||
"Coalesce": true, | ||
"ConcatOperandRemoval": true, | ||
"Continue_": true, | ||
"Decrement": true, | ||
"DivEqual": true, | ||
"Division": { | ||
"ignore": [ | ||
"Nexus\\Clock\\SystemClock" | ||
] | ||
}, | ||
"DoWhile": true, | ||
"ElseIfNegation": true, | ||
"Equal": true, | ||
"EqualIdentical": true, | ||
"Exponentiation": true, | ||
"FalseValue": true, | ||
"Finally_": true, | ||
"FloatNegation": true, | ||
"For_": true, | ||
"Foreach_": true, | ||
"FunctionCall": true, | ||
"GreaterThanNegotiation": true, | ||
"GreaterThanOrEqualToNegotiation": true, | ||
"Identical": true, | ||
"IfNegation": true, | ||
"Increment": true, | ||
"InstanceOf_": true, | ||
"LessThanNegotiation": true, | ||
"LessThanOrEqualToNegotiation": true, | ||
"LogicalAnd": true, | ||
"LogicalAndAllSubExprNegation": true, | ||
"LogicalAndNegation": true, | ||
"LogicalAndSingleSubExprNegation": true, | ||
"LogicalLowerAnd": true, | ||
"LogicalLowerOr": true, | ||
"LogicalNot": true, | ||
"LogicalOr": true, | ||
"LogicalOrAllSubExprNegation": true, | ||
"LogicalOrNegation": true, | ||
"LogicalOrSingleSubExprNegation": true, | ||
"MBString": true, | ||
"MatchArmRemoval": true, | ||
"MethodCallRemoval": true, | ||
"MinusEqual": true, | ||
"ModEqual": { | ||
"ignore": [ | ||
"Nexus\\Clock\\SystemClock" | ||
] | ||
}, | ||
"Modulus": true, | ||
"MulEqual": true, | ||
"Multiplication": true, | ||
"NewObject": true, | ||
"NotEqual": true, | ||
"NotEqualNotIdentical": true, | ||
"NullSafeMethodCall": true, | ||
"NullSafePropertyCall": true, | ||
"OneZeroFloat": true, | ||
"PlusEqual": true, | ||
"PowEqual": true, | ||
"PregMatchMatches": true, | ||
"PregMatchRemoveCaret": true, | ||
"PregMatchRemoveDollar": true, | ||
"PregMatchRemoveFlags": true, | ||
"PregQuote": true, | ||
"ProtectedVisibility": true, | ||
"PublicVisibility": true, | ||
"SharedCaseRemoval": true, | ||
"ShiftLeft": true, | ||
"ShiftRight": true, | ||
"Spaceship": true, | ||
"SpreadAssignment": true, | ||
"SpreadOneItem": true, | ||
"SpreadRemoval": true, | ||
"Ternary": true, | ||
"This": true, | ||
"Throw_": true, | ||
"TrueValue": true, | ||
"UnwrapArrayChangeKeyCase": true, | ||
"UnwrapArrayChunk": true, | ||
"UnwrapArrayColumn": true, | ||
"UnwrapArrayCombine": true, | ||
"UnwrapArrayDiff": true, | ||
"UnwrapArrayDiffAssoc": true, | ||
"UnwrapArrayDiffKey": true, | ||
"UnwrapArrayDiffUassoc": true, | ||
"UnwrapArrayDiffUkey": true, | ||
"UnwrapArrayFilter": true, | ||
"UnwrapArrayFlip": true, | ||
"UnwrapArrayIntersect": true, | ||
"UnwrapArrayIntersectAssoc": true, | ||
"UnwrapArrayIntersectKey": true, | ||
"UnwrapArrayIntersectUassoc": true, | ||
"UnwrapArrayIntersectUkey": true, | ||
"UnwrapArrayKeys": true, | ||
"UnwrapArrayMap": true, | ||
"UnwrapArrayMerge": true, | ||
"UnwrapArrayMergeRecursive": true, | ||
"UnwrapArrayPad": true, | ||
"UnwrapArrayReduce": true, | ||
"UnwrapArrayReplace": true, | ||
"UnwrapArrayReplaceRecursive": true, | ||
"UnwrapArrayReverse": true, | ||
"UnwrapArraySlice": true, | ||
"UnwrapArraySplice": true, | ||
"UnwrapArrayUdiff": true, | ||
"UnwrapArrayUdiffAssoc": true, | ||
"UnwrapArrayUdiffUassoc": true, | ||
"UnwrapArrayUintersect": true, | ||
"UnwrapArrayUintersectAssoc": true, | ||
"UnwrapArrayUintersectUassoc": true, | ||
"UnwrapArrayUnique": true, | ||
"UnwrapArrayValues": true, | ||
"UnwrapFinally": true, | ||
"UnwrapLcFirst": true, | ||
"UnwrapLtrim": true, | ||
"UnwrapRtrim": true, | ||
"UnwrapStrIreplace": true, | ||
"UnwrapStrRepeat": true, | ||
"UnwrapStrReplace": true, | ||
"UnwrapStrRev": true, | ||
"UnwrapStrShuffle": true, | ||
"UnwrapStrToLower": true, | ||
"UnwrapStrToUpper": true, | ||
"UnwrapSubstr": true, | ||
"UnwrapTrim": true, | ||
"UnwrapUcFirst": true, | ||
"UnwrapUcWords": true, | ||
"While_": true, | ||
"YieldValue": true, | ||
"Yield_": true | ||
}, | ||
"testFramework": "phpunit", | ||
"testFrameworkOptions": "--group=unit-test" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the Nexus framework. | ||
* | ||
* (c) John Paul E. Balandan, CPA <[email protected]> | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nexus\Tests\AutoReview; | ||
|
||
use Nexus\Tools\InfectionConfigBuilder; | ||
use PHPUnit\Framework\Attributes\CoversNothing; | ||
use PHPUnit\Framework\Attributes\Group; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
#[CoversNothing] | ||
#[Group('auto-review')] | ||
final class InfectionConfigTest extends TestCase | ||
{ | ||
public function testInfectionJsonIsUpdated(): void | ||
{ | ||
if (is_file(__DIR__.'/../../tools/vendor/autoload.php')) { | ||
require_once __DIR__.'/../../tools/vendor/autoload.php'; | ||
} else { | ||
self::markTestSkipped('Install `tools` to run this test.'); | ||
} | ||
|
||
$infectionJson = file_get_contents(__DIR__.'/../../infection.json5'); | ||
self::assertIsString($infectionJson); | ||
|
||
$actualConfig = json_decode($infectionJson, true); | ||
self::assertIsArray($actualConfig); | ||
self::assertSame( | ||
InfectionConfigBuilder::build(), | ||
$actualConfig, | ||
'The infection.json5 is not updated; run `bin/build-infection` to update.', | ||
); | ||
} | ||
} |
Oops, something went wrong.