From 3503a5b63ad5aa65469c77adf1713765d980708d Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 9 May 2017 11:25:54 +0200 Subject: [PATCH] TASK: Update PhpDocCommentSniff tests to reflect added removed extension Relates: #44 --- .../Classname/PhpDocCommentSniff/Expected.diff | 3 ++- .../Classname/PhpDocCommentSniff/Expected.json | 17 +++++++++++++---- .../PhpDocCommentSniff/InputFileForIssues.php | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff index 36a8cf7..3c7394d 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff @@ -1,6 +1,6 @@ --- tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php +++ PHP_CodeSniffer -@@ -22,20 +22,20 @@ +@@ -22,21 +22,21 @@ class InputFileForIssues { /** @@ -14,6 +14,7 @@ - * @param t3lib_div + * @param \TYPO3\CMS\Core\Utility\GeneralUtility * @param \TYPO3\CMS\Backend\Template\MediumDocumentTemplate + * @param \TYPO3\CMS\Perm\Controller\PermissionAjaxController * - * @return Tx_Extbase_Configuration_Configurationmanager + * @return \TYPO3\CMS\Extbase\Configuration\ConfigurationManager diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json index 89158c7..8d55953 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json @@ -30,10 +30,19 @@ "source": "Typo3Update.Classname.PhpDocComment.RemovedClass.TYPO3_CMS_Backend_Template_MediumDocumentTemplate", "type": "WARNING" }, + { + "column": 15, + "fixable": false, + "line": 33, + "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.PhpDocComment.RemovedClass.perm", + "type": "WARNING" + }, { "column": 16, "fixable": true, - "line": 34, + "line": 35, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Configuration_Configurationmanager\", use \"TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager\" instead", "severity": 5, "source": "Typo3Update.Classname.PhpDocComment.legacyClassname", @@ -42,19 +51,19 @@ { "column": 18, "fixable": true, - "line": 38, + "line": 39, "message": "Legacy classes are not allowed; found \"t3lib_div\", use \"TYPO3\\CMS\\Core\\Utility\\GeneralUtility\" instead", "severity": 5, "source": "Typo3Update.Classname.PhpDocComment.legacyClassname", "type": "ERROR" } ], - "warnings": 1 + "warnings": 2 } }, "totals": { "errors": 4, "fixable": 4, - "warnings": 1 + "warnings": 2 } } diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php index 7a2de67..181b1fd 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php @@ -30,6 +30,7 @@ class InputFileForIssues /** * @param t3lib_div * @param \TYPO3\CMS\Backend\Template\MediumDocumentTemplate + * @param \TYPO3\CMS\Perm\Controller\PermissionAjaxController * * @return Tx_Extbase_Configuration_Configurationmanager */