TestSuite.php 845 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * A PHP_CodeSniffer specific test suite for PHPUnit.
  4. *
  5. * @author Greg Sherwood <gsherwood@squiz.net>
  6. * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
  7. * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
  8. */
  9. namespace PHP_CodeSniffer\Tests;
  10. use PHPUnit\Framework\TestSuite as PHPUnit_TestSuite;
  11. use PHPUnit\Framework\TestResult;
  12. class TestSuite extends PHPUnit_TestSuite
  13. {
  14. /**
  15. * Runs the tests and collects their result in a TestResult.
  16. *
  17. * @param \PHPUnit\Framework\TestResult $result A test result.
  18. *
  19. * @return \PHPUnit\Framework\TestResult
  20. */
  21. public function run(TestResult $result=null)
  22. {
  23. $result = parent::run($result);
  24. printPHPCodeSnifferTestOutput();
  25. return $result;
  26. }//end run()
  27. }//end class