Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <?php
  2.  
  3. function getTests() {
  4. $tests = parent::getTests();
  5. $testMethods = array_udiff($tests, $this->methods, 'strcasecmp');
  6. if (!isset($this->testMethods) || empty($this->testMethods)) {
  7. $this->testMethods = $testMethods;
  8. }
  9. if (!is_array($this->testMethods)) {
  10. $this->testMethods = array($this->testMethods);
  11. }
  12. if (isset($this->skipSetup) && $this->skipSetup) {
  13. $tests = array_udiff($tests, array('start', 'end'), 'strcasecmp');
  14. }
  15. if (empty($this->testMethods)) {
  16. return $tests;
  17. }
  18. $removeMethods = array_udiff($testMethods, $this->testMethods, 'strcasecmp');
  19. $tests = array_udiff($tests, $removeMethods, 'strcasecmp');
  20. $skipped = array_udiff($testMethods, $this->testMethods, 'strcasecmp');
  21. foreach ($skipped as $skip) {
  22. $this->_reporter->paintSkip(sprintf(__('Skipped entire test method: %s', true), $skip));
  23. }
  24. return $tests;
  25. }
Add Comment
Please, Sign In to add comment