TASK: Update InstanceofSniff tests to reflect added removed extension

Relates: #44
This commit is contained in:
Daniel Siepmann 2017-05-09 12:09:51 +02:00
parent 8dd569a6a6
commit 27864c70a1
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 28 additions and 3 deletions

View file

@ -1,6 +1,6 @@
--- tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/InputFileForIssues.php
+++ PHP_CodeSniffer
@@ -19,6 +19,6 @@
@@ -19,7 +19,7 @@
* 02110-1301, USA.
*/
@ -8,3 +8,4 @@
+if ($a instanceof \TYPO3\CMS\Core\SingletonInterface) {
// do something
}
if ($a instanceof \TYPO3\CMS\Perm\Controller\PermissionAjaxController) {

View file

@ -11,14 +11,32 @@
"severity": 5,
"source": "Typo3Update.Classname.Instanceof.legacyClassname",
"type": "ERROR"
},
{
"column": 20,
"fixable": false,
"line": 25,
"message": "Calls to removed code are not allowed; found perm. Removed in 7.0. The logic is moved into EXT:beuser. See: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62339-MoveExtPermIntoExtBeuser.html",
"severity": 5,
"source": "Typo3Update.Classname.Instanceof.RemovedExtension.perm",
"type": "WARNING"
},
{
"column": 19,
"fixable": false,
"line": 28,
"message": "Calls to removed code are not allowed; found perm. Removed in 7.0. The logic is moved into EXT:beuser. See: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62339-MoveExtPermIntoExtBeuser.html",
"severity": 5,
"source": "Typo3Update.Classname.Instanceof.RemovedExtension.perm",
"type": "WARNING"
}
],
"warnings": 0
"warnings": 2
}
},
"totals": {
"errors": 1,
"fixable": 1,
"warnings": 0
"warnings": 2
}
}

View file

@ -22,3 +22,9 @@
if ($a instanceof t3lib_Singleton) {
// do something
}
if ($a instanceof \TYPO3\CMS\Perm\Controller\PermissionAjaxController) {
// do something
}
if ($a instanceof TYPO3\CMS\Perm\Controller\PermissionAjaxController) {
// do something
}