Ejecuta cualquier Skill en Manus
con un clic
con un clic
Ejecuta cualquier Skill en Manus con un clic
Comenzar$pwd:
$ git log --oneline --stat
stars:209
forks:86
updated:14 de febrero de 2026, 12:43
SKILL.md
| name | gen-test |
| description | Generate a PHPStan rule test class and fixture data file |
| disable-model-invocation | true |
| arguments | [{"name":"rule_class","description":"Fully qualified class name of the rule to test (e.g. mglaman\\PHPStanDrupal\\Rules\\Drupal\\EntityQuery\\EntityQueryHasAccessCheckRule)"}] |
Create a test class and fixture file for a PHPStan rule in this project.
Rules\Classes\ -> tests/src/Rules/Rules\Deprecations\ -> tests/src/Rules/Rules\Drupal\ -> tests/src/Rules/Rules\Drush\ -> tests/src/Rules/Type\ -> tests/src/Type/mglaman\PHPStanDrupal\Tests\DrupalRuleTestCasedeclare(strict_types=1) at the topfinalgetRule() returning an instance of the rule@dataProvider cases with a generator[files, errors] where errors are [message, line, tip?]tests/src/Rules/data/ or tests/src/Type/data/php vendor/bin/phpunit --filter=TheNewTestClass to verify<?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Rules;
use mglaman\PHPStanDrupal\Rules\Drupal\ExampleRule;
use mglaman\PHPStanDrupal\Tests\DrupalRuleTestCase;
final class ExampleRuleTest extends DrupalRuleTestCase
{
protected function getRule(): \PHPStan\Rules\Rule
{
return new ExampleRule();
}
/**
* @dataProvider cases
*
* @param list<array{0: string, 1: int, 2?: string|null}> $errors
*/
public function test(array $files, array $errors): void
{
$this->analyse($files, $errors);
}
public static function cases(): \Generator
{
yield 'passing case' => [
[__DIR__ . '/data/example-pass.php'],
[],
];
yield 'failing case' => [
[__DIR__ . '/data/example-fail.php'],
[
['Error message here.', 10],
],
];
}
}