Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
testPhpFiles () | |
testClassFiles () | |
testTemplateMageCalls () | |
testXmlFiles () | |
testJsFiles () | |
testMageMethodsObsolete () | |
Static Public Member Functions | |
static | setUpBeforeClass () |
Protected Member Functions | |
_testObsoleteClasses ($content) | |
_testObsoleteNamespaces ($content) | |
_testObsoleteMethods ($content, $file) | |
_testObsoletePaths ($file) | |
_testGetChildSpecialCase ($content, $file) | |
_testGetOptionsSpecialCase ($content) | |
_testObsoleteMethodArguments ($content) | |
_testObsoleteProperties ($content) | |
_testObsoleteActions ($content) | |
_testObsoleteConstants ($content) | |
_isClassConstantDefined ($content, $constant) | |
_getClassConstantDefinitionRegExp ($constant) | |
_testObsoletePropertySkipCalculate ($content) | |
_isClassOrInterface ($content, $name) | |
_isDirectDescendant ($content, $name) | |
_assertNotRegexp ($regex, $content, $message) | |
Static Protected Member Functions | |
static | _populateList (array &$list, array &$errors, $filePattern, $hasScope=true) |
static | _padRow ($row, $hasScope) |
Static Protected Attributes | |
static | $_classes = [] |
static | $_constants = [] |
static | $_methods = [] |
static | $_attributes = [] |
static | $_namespaces = [] |
static | $_paths = [] |
@SuppressWarnings(PHPMD.ExcessiveClassComplexity)
Definition at line 21 of file ObsoleteCodeTest.php.
|
protected |
Custom replacement for assertNotRegexp()
In this particular test the original assertNotRegexp() cannot be used because of too large text $content, which obfuscates tests output
string | $regex | |
string | $content | |
string | $message |
Definition at line 874 of file ObsoleteCodeTest.php.
|
protected |
Retrieve a PCRE matching a class constant definition
string | $constant |
Definition at line 803 of file ObsoleteCodeTest.php.
|
protected |
Whether a class constant is defined in the content or not
string | $content | |
string | $constant |
Definition at line 792 of file ObsoleteCodeTest.php.
|
protected |
Analyze contents to determine whether this is declaration of specified class/interface
string | $content | |
string | $name |
Definition at line 827 of file ObsoleteCodeTest.php.
|
protected |
Analyze contents to determine whether this is a direct descendant of specified class/interface
string | $content | |
string | $name |
Definition at line 840 of file ObsoleteCodeTest.php.
|
staticprotected |
Populate insufficient row elements regarding to whether the row supposed to have scope value
array | $row | |
bool | $hasScope |
Definition at line 100 of file ObsoleteCodeTest.php.
|
staticprotected |
Read the specified file pattern and merge it with the list
Duplicate entries will be recorded into errors array.
array | $list | |
array | $errors | |
string | $filePattern | |
bool | $hasScope |
Definition at line 77 of file ObsoleteCodeTest.php.
|
protected |
Special case: don't allow usage of getChild() method anywhere within app directory
In Magento 1.x it used to belong only to abstract block (therefore all blocks) At the same time, the name is pretty generic and can be encountered in other directories, such as lib
string | $content | |
string | $file |
Definition at line 327 of file ObsoleteCodeTest.php.
|
protected |
Special case for ->getConfig()->getOptions()->
string | $content |
Definition at line 347 of file ObsoleteCodeTest.php.
|
protected |
string | $content |
Definition at line 409 of file ObsoleteCodeTest.php.
|
protected |
Assert that obsolete classes are not used in the content
string | $content |
Definition at line 197 of file ObsoleteCodeTest.php.
|
protected |
Assert that obsolete constants are not defined/used in the content
Without class context, only presence of the literal will be checked.
In context of a class, match:
string | $content |
Definition at line 430 of file ObsoleteCodeTest.php.
|
protected |
string | $content |
Definition at line 361 of file ObsoleteCodeTest.php.
|
protected |
Assert that obsolete methods or functions are not used in the content
If class context is not specified, declaration/invocation of all functions or methods (of any class) will be matched across the board
If context is specified, only the methods will be matched as follows:
string | $content | |
string | $file |
Definition at line 247 of file ObsoleteCodeTest.php.
|
protected |
Assert that obsolete classes are not used in the content
string | $content |
Definition at line 217 of file ObsoleteCodeTest.php.
|
protected |
Assert that obsolete paths are not used in the content
This method will search the content for references to class that start with obsolete namespace
string | $file |
Definition at line 301 of file ObsoleteCodeTest.php.
|
protected |
string | $content |
Definition at line 386 of file ObsoleteCodeTest.php.
|
protected |
|
static |
#- Read fixtures into memory as arrays
Definition at line 45 of file ObsoleteCodeTest.php.
testClassFiles | ( | ) |
Definition at line 135 of file ObsoleteCodeTest.php.
testJsFiles | ( | ) |
Definition at line 180 of file ObsoleteCodeTest.php.
testMageMethodsObsolete | ( | ) |
Check absence of obsolete Mage class usages
string | $file |
Definition at line 879 of file ObsoleteCodeTest.php.
testPhpFiles | ( | ) |
Definition at line 109 of file ObsoleteCodeTest.php.
testTemplateMageCalls | ( | ) |
Definition at line 146 of file ObsoleteCodeTest.php.
testXmlFiles | ( | ) |
Definition at line 166 of file ObsoleteCodeTest.php.
|
staticprotected |
Definition at line 34 of file ObsoleteCodeTest.php.
|
staticprotected |
Definition at line 28 of file ObsoleteCodeTest.php.
|
staticprotected |
Definition at line 30 of file ObsoleteCodeTest.php.
|
staticprotected |
Definition at line 32 of file ObsoleteCodeTest.php.
|
staticprotected |
Definition at line 36 of file ObsoleteCodeTest.php.
|
staticprotected |
Definition at line 38 of file ObsoleteCodeTest.php.