SuggestTypeTest
extends TestCase
in package
FinalYes
Tests for the \PHP_CodeSniffer\Util\Common::suggestType() method.
Tags
Table of Contents
Methods
- dataSuggestTypeAllowedType() : array<string, array<string|int, string>>
- Data provider.
- dataSuggestTypeAllowedTypeWrongCase() : array<string, array<string, string>>
- Data provider.
- dataSuggestTypeOther() : array<string, array<string, string>>
- Data provider.
- testSuggestTypeAllowedType() : void
- Test passing one of the allowed types to the suggestType() method.
- testSuggestTypeAllowedTypeWrongCase() : void
- Test passing one of the allowed types in the wrong case to the suggestType() method.
- testSuggestTypeEmpty() : void
- Test passing an empty type to the suggestType() method.
- testSuggestTypeOther() : void
- Test the suggestType() method for all other cases.
Methods
dataSuggestTypeAllowedType()
Data provider.
public
static dataSuggestTypeAllowedType() : array<string, array<string|int, string>>
Tags
Return values
array<string, array<string|int, string>>dataSuggestTypeAllowedTypeWrongCase()
Data provider.
public
static dataSuggestTypeAllowedTypeWrongCase() : array<string, array<string, string>>
Tags
Return values
array<string, array<string, string>>dataSuggestTypeOther()
Data provider.
public
static dataSuggestTypeOther() : array<string, array<string, string>>
Tags
Return values
array<string, array<string, string>>testSuggestTypeAllowedType()
Test passing one of the allowed types to the suggestType() method.
public
testSuggestTypeAllowedType(string $varType) : void
Parameters
- $varType : string
-
The type.
Tags
testSuggestTypeAllowedTypeWrongCase()
Test passing one of the allowed types in the wrong case to the suggestType() method.
public
testSuggestTypeAllowedTypeWrongCase(string $varType, string $expected) : void
Parameters
- $varType : string
-
The type found.
- $expected : string
-
Expected suggested type.
Tags
testSuggestTypeEmpty()
Test passing an empty type to the suggestType() method.
public
testSuggestTypeEmpty() : void
testSuggestTypeOther()
Test the suggestType() method for all other cases.
public
testSuggestTypeOther(string $varType, string $expected) : void
Parameters
- $varType : string
-
The type found.
- $expected : string
-
Expected suggested type.