acquia / coding-standards-php

PHP_CodeSniffer rules (sniffs) for Acquia coding standards
GNU General Public License v2.0
19 stars 13 forks source link

Add automated tests #72

Open TravisCarden opened 3 months ago

TravisCarden commented 3 months ago

It's time to start testing our standards. There are some precedents we can look to in https://github.com/squizlabs/PHP_CodeSniffer/tree/master/tests and https://github.com/slevomat/coding-standard/tree/master/tests. They take slightly different approaches; I think both will be informative. Alternatively, PHP itself has a very nice PHPT test file format that encapsulated very granular assertions all in one file (with the ability to use external fixtures still). (Example. Observe the --FILE-- and --EXPECTF-- sections, in particular.) I wouldn't mind adding either of these approaches to my toolkit.