SniffsExcludeArgsTest
extends TestCase
in package
FinalYes
Tests for the \PHP_CodeSniffer\Config --sniffs and --exclude arguments.
Tags
Table of Contents
Methods
- dataInvalidSniffs() : array<string, array<string, string>>
- Data provider for testInvalid().
- dataOnlySetOnce() : array<string, array<string|int, string>>
- Data provider for testOnlySetOnce().
- dataValidSniffs() : array<string, array<string, string>>
- Data provider for testValid().
- testInvalid() : void
- Ensure that the expected error message is returned for invalid arguments.
- testOnlySetOnce() : void
- Ensure that only the first argument is processed and others are ignored.
- testValid() : void
- Ensure that the valid data does not throw an exception, and the value is stored.
Methods
dataInvalidSniffs()
Data provider for testInvalid().
public
static dataInvalidSniffs() : array<string, array<string, string>>
Tags
Return values
array<string, array<string, string>>dataOnlySetOnce()
Data provider for testOnlySetOnce().
public
static dataOnlySetOnce() : array<string, array<string|int, string>>
Return values
array<string, array<string|int, string>>dataValidSniffs()
Data provider for testValid().
public
static dataValidSniffs() : array<string, array<string, string>>
Tags
Return values
array<string, array<string, string>>testInvalid()
Ensure that the expected error message is returned for invalid arguments.
public
testInvalid(string $argument, string $value, string $message) : void
Parameters
- $argument : string
-
'sniffs' or 'exclude'.
- $value : string
-
List of sniffs to include / exclude.
- $message : string
-
Expected error message text.
Tags
testOnlySetOnce()
Ensure that only the first argument is processed and others are ignored.
public
testOnlySetOnce(string $argument) : void
Parameters
- $argument : string
-
'sniffs' or 'exclude'.
Tags
testValid()
Ensure that the valid data does not throw an exception, and the value is stored.
public
testValid(string $argument, string $value) : void
Parameters
- $argument : string
-
'sniffs' or 'exclude'.
- $value : string
-
List of sniffs to include or exclude.