TASK: Add test for TypeHintCatchExceptionSniff

* Check that the sniff works with new feature of removed extension.

Relates: #44
This commit is contained in:
Daniel Siepmann 2017-05-09 10:55:17 +02:00
parent fda1921d50
commit b32fc01110
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 17 additions and 2 deletions

View file

@ -20,14 +20,23 @@
"severity": 5, "severity": 5,
"source": "Typo3Update.Classname.TypeHintCatchException.legacyClassname", "source": "Typo3Update.Classname.TypeHintCatchException.legacyClassname",
"type": "ERROR" "type": "ERROR"
},
{
"column": 11,
"fixable": false,
"line": 48,
"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.TypeHintCatchException.RemovedClass.perm",
"type": "WARNING"
} }
], ],
"warnings": 0 "warnings": 1
} }
}, },
"totals": { "totals": {
"errors": 2, "errors": 2,
"fixable": 2, "fixable": 2,
"warnings": 0 "warnings": 1
} }
} }

View file

@ -42,3 +42,9 @@ try {
} catch (TYPO3\CMS\Extbase\Exception $e) { } catch (TYPO3\CMS\Extbase\Exception $e) {
// else // else
} }
try {
// something
} catch (\TYPO3\CMS\Perm\Controller\PermissionAjaxController $e) {
// else
}