diff --git a/composer.json b/composer.json index 1a6cfa4..a072e43 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,12 @@ ], "require": { "php": "^8.2", - "nikic/php-parser": "^5.1.0", + "nikic/php-parser": "^5.2.0", "pestphp/pest-plugin": "^3.0.0", "psr/simple-cache": "^3.0.0" }, "require-dev": { - "pestphp/pest": "^3.0.1", + "pestphp/pest": "^3.0.8", "pestphp/pest-dev-tools": "^3.0.0", "pestphp/pest-plugin-type-coverage": "^3.0.0" }, diff --git a/src/Plugins/Mutate.php b/src/Plugins/Mutate.php index 56c3e1f..9861966 100644 --- a/src/Plugins/Mutate.php +++ b/src/Plugins/Mutate.php @@ -159,11 +159,12 @@ public function addOutput(int $exitCode): int $paths = $configurationRepository->cliConfiguration->toArray()['paths'] ?? false; if (! is_array($paths) && $configuration->classes === [] && ! $configuration->everything) { - $this->output->writeln([' ERROR Mutation testing requires the usage of the `covers()` function. Here is an example:', '']); + $this->output->writeln([' ERROR Mutation testing requires the usage of the `covers()` function or `mutates()` function. Here is an example:', '']); $highlighter = new Highlighter; $content = $highlighter->highlight(<<<'PHP' covers(TodoController::class); // mutations will be generated only for this class + // or mutates(TodoController::class); it('list todos', function () { // your test here... @@ -180,7 +181,7 @@ public function addOutput(int $exitCode): int ' pest --mutate --parallel --everything --covered-only', ]); - $this->output->writeln(['', ' However, we recommend using the `covers()` function for better performance, and keep tracking of your mutation testing score over time.']); + $this->output->writeln(['', ' However, we recommend using the `covers()` function or the `mutates` function for better performance, and keep tracking of your mutation testing score over time.']); return 1; }