From b79fff9536a1f27e4b623d4b2992b9e86b8ca770 Mon Sep 17 00:00:00 2001 From: davidperezgar Date: Wed, 23 Oct 2024 23:47:13 +0200 Subject: [PATCH] unit test --- .../CodeAnalysis/GenericNamesUnitTest.php | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 phpcs-sniffs/PluginCheck/Tests/CodeAnalysis/GenericNamesUnitTest.php diff --git a/phpcs-sniffs/PluginCheck/Tests/CodeAnalysis/GenericNamesUnitTest.php b/phpcs-sniffs/PluginCheck/Tests/CodeAnalysis/GenericNamesUnitTest.php new file mode 100644 index 000000000..8b00a6fb2 --- /dev/null +++ b/phpcs-sniffs/PluginCheck/Tests/CodeAnalysis/GenericNamesUnitTest.php @@ -0,0 +1,57 @@ + => + */ + public function getErrorList() { + return array( + 3 => 1, + ); + } + + /** + * Returns the lines where warnings should occur. + * + * @return array => + */ + public function getWarningList() { + return array(); + } + + /** + * Returns the fully qualified class name (FQCN) of the sniff. + * + * @return string The fully qualified class name of the sniff. + */ + protected function get_sniff_fqcn() { + return GenericNamesSniff::class; + } + + /** + * Sets the parameters for the sniff. + * + * @throws \RuntimeException If unable to set the ruleset parameters required for the test. + * + * @param Sniff $sniff The sniff being tested. + */ + public function set_sniff_parameters( Sniff $sniff ) { + } +}