coding-standards-php icon indicating copy to clipboard operation
coding-standards-php copied to clipboard

Add automated tests

Open TravisCarden opened this issue 1 year ago • 0 comments

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.

  • [ ] Decide on an approach.
  • [ ] Make it easy to run locally with a test Composer custom script.
  • [ ] Configure it to run on CI.

TravisCarden avatar Jul 11 '24 19:07 TravisCarden