| 10 | if ( class_exists( 'PHPUnit\Runner\Version' ) && version_compare( PHPUnit\Runner\Version::id(), '6.0', '>=' ) ) { |
| 11 | class_alias( 'PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' ); |
| 12 | class_alias( 'PHPUnit\Framework\Exception', 'PHPUnit_Framework_Exception' ); |
| 13 | class_alias( 'PHPUnit\Framework\ExpectationFailedException', 'PHPUnit_Framework_ExpectationFailedException' ); |
| 14 | class_alias( 'PHPUnit\Framework\Error\Notice', 'PHPUnit_Framework_Error_Notice' ); |
| 15 | class_alias( 'PHPUnit\Framework\Test', 'PHPUnit_Framework_Test' ); |
| 16 | class_alias( 'PHPUnit\Framework\Warning', 'PHPUnit_Framework_Warning' ); |
| 17 | class_alias( 'PHPUnit\Framework\AssertionFailedError', 'PHPUnit_Framework_AssertionFailedError' ); |
| 18 | class_alias( 'PHPUnit\Framework\TestSuite', 'PHPUnit_Framework_TestSuite' ); |
| 19 | class_alias( 'PHPUnit\Framework\TestListener', 'PHPUnit_Framework_TestListener' ); |
| 20 | class_alias( 'PHPUnit\Util\GlobalState', 'PHPUnit_Util_GlobalState' ); |
| 21 | class_alias( 'PHPUnit\Util\Getopt', 'PHPUnit_Util_Getopt' ); |
| 22 | |
| 23 | class PHPUnit_Util_Test extends PHPUnit\Util\Test { |
| 24 | public static function getTickets( $className, $methodName ) { |
| 25 | $annotations = self::parseTestMethodAnnotations( |
| 26 | $className, $methodName |
| 27 | ); |
| 28 | |
| 29 | $tickets = array(); |
| 30 | |
| 31 | if (isset($annotations['class']['ticket'])) { |
| 32 | $tickets = $annotations['class']['ticket']; |
| 33 | } |
| 34 | |
| 35 | if (isset($annotations['method']['ticket'])) { |
| 36 | $tickets = array_merge($tickets, $annotations['method']['ticket']); |
| 37 | } |
| 38 | |
| 39 | return array_unique($tickets); |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |