diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Expected.diff new file mode 100644 index 0000000..c9b6ec6 --- /dev/null +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Expected.diff @@ -0,0 +1,16 @@ +--- tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/InputFileForIssues.php ++++ PHP_CodeSniffer +@@ -1,4 +1,5 @@ + +@@ -21,6 +22,6 @@ + + use Tx_Extbase_Mvc_Controller_ActionController; + +-class Tx_ExtName_Controller_Frontendcontroller extends Tx_Extbase_Mvc_Controller_ActionController ++class Frontendcontroller extends Tx_Extbase_Mvc_Controller_ActionController + { + } diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Expected.json new file mode 100644 index 0000000..a720806 --- /dev/null +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Expected.json @@ -0,0 +1,24 @@ +{ + "files": { + "InputFileForIssues.php": { + "errors": 1, + "messages": [ + { + "column": 7, + "fixable": true, + "line": 24, + "message": "Legacy class definitions are not allowed; found \"Tx_ExtName_Controller_Frontendcontroller\". Wrap your class inside a namespace.", + "severity": 5, + "source": "Typo3Update.LegacyClassnames.MissingNamespace.legacyClassname", + "type": "ERROR" + } + ], + "warnings": 0 + } + }, + "totals": { + "errors": 1, + "fixable": 1, + "warnings": 0 + } +} diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/InputFileForIssues.php new file mode 100644 index 0000000..ec7a09e --- /dev/null +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/InputFileForIssues.php @@ -0,0 +1,26 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use Tx_Extbase_Mvc_Controller_ActionController; + +class Tx_ExtName_Controller_Frontendcontroller extends Tx_Extbase_Mvc_Controller_ActionController +{ +}