-
Notifications
You must be signed in to change notification settings - Fork 60
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
08bcc4e
commit b79fff9
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
phpcs-sniffs/PluginCheck/Tests/CodeAnalysis/GenericNamesUnitTest.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/** | ||
* Unit tests for GenericNamesSniff. | ||
* | ||
* @package PluginCheck | ||
*/ | ||
|
||
namespace PluginCheckCS\PluginCheck\Tests\CodeAnalysis; | ||
|
||
use PluginCheckCS\PluginCheck\Sniffs\CodeAnalysis\GenericNamesSniff; | ||
use PluginCheckCS\PluginCheck\Tests\AbstractSniffUnitTest; | ||
use PHP_CodeSniffer\Sniffs\Sniff; | ||
|
||
/** | ||
* Unit tests for GenericNamesSniff. | ||
*/ | ||
final class GenericNamesUnitTest extends AbstractSniffUnitTest { | ||
|
||
/** | ||
* Returns the lines where errors should occur. | ||
* | ||
* @return array <int line number> => <int number of errors> | ||
*/ | ||
public function getErrorList() { | ||
return array( | ||
3 => 1, | ||
); | ||
} | ||
|
||
/** | ||
* Returns the lines where warnings should occur. | ||
* | ||
* @return array <int line number> => <int number of warnings> | ||
*/ | ||
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 ) { | ||
} | ||
} |