PHP Class PhpCsFixer\Test\AbstractIntegrationTestCase
This test searches for '.test' fixture files in the given directory.
Each fixture file will be parsed and tested against the expected result.
Fixture files have the following format:
--TEST--
Example test description.
--CONFIG--
{"@PSR2": true, "strict": true}
--SETTINGS--*
checkPriority=true
--REQUIREMENTS--*
php=5.4**
hhvm=false***
--EXPECT--
Expected code after fixing
--INPUT--*
Code to fix
* Section or any line in it may be omitted.
** PHP minimum version. Default to current running php version (no effect).
*** HHVM compliant flag. Default to true. Set to false to skip test under HHVM.
Exibir arquivo
Open project: friendsofphp/php-cs-fixer
Protected Properties
Property |
Type |
Description |
|
$linter |
PhpCsFixer\Linter\LinterInterface |
|
|
Public Methods
Protected Methods
Method |
Description |
|
doTest ( IntegrationCase $case ) |
Applies the given fixers on the input and checks the result. |
|
getFixturesDir ( ) : string |
Returns the full path to directory which contains the tests. |
|
getTempFile ( ) : string |
Returns the full path to the temporary file where the test will write to. |
|
setUp ( ) |
|
|
Private Methods
Method Details
doTest()
protected method
It will write the input to a temp file. The file will be fixed by a Fixer instance
configured with the given fixers. The result is compared with the expected output.
It checks if no errors were reported during the fixing.
protected doTest ( IntegrationCase $case ) |
$case |
IntegrationCase |
|
getFixturesDir()
protected static method
Returns the full path to directory which contains the tests.
getTempFile()
protected static method
Returns the full path to the temporary file where the test will write to.
Creates test data by parsing '.test' files.
public getTests ( ) : IntegrationCase[][] |
return |
IntegrationCase[][] |
|
setUpBeforeClass()
public static method
tearDownAfterClass()
public static method
testIntegration()
public method
Property Details
$linter protected_oe property
protected LinterInterface,PhpCsFixer\Linter $linter |
return |
PhpCsFixer\Linter\LinterInterface |
|