Ticket #36786: 36786.patch
File 36786.patch, 777 bytes (added by , 8 years ago) |
---|
-
tests/phpunit/includes/utils.php
108 108 return $this->events; 109 109 } 110 110 111 // return a count of the number of times the action was called since the last reset111 // Return a count of the number of times an action or filter was called since the last reset. 112 112 function get_call_count($tag='') { 113 113 if ($tag) { 114 114 $count = 0; 115 115 foreach ($this->events as $e) 116 if ( $e['action'] == $tag)116 if ( ( isset( $e['action'] ) && $e['action'] == $tag ) || ( isset( $e['filter'] ) && $e['filter'] == $tag ) ) { 117 117 ++$count; 118 } 118 119 return $count; 119 120 } 120 121 return count($this->events);