You are here

public static function PHPUnit_Util_Test::getTickets in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Util/Test.php \PHPUnit_Util_Test::getTickets()

Returns the tickets for a test class or method.

@since Method available since Release 3.4.0

Parameters

string $className:

string $methodName:

Return value

array

2 calls to PHPUnit_Util_Test::getTickets()
PHPUnit_Extensions_TicketListener::endTest in vendor/phpunit/phpunit/src/Extensions/TicketListener.php
A test ended.
PHPUnit_Extensions_TicketListener::startTest in vendor/phpunit/phpunit/src/Extensions/TicketListener.php
A test started.

File

vendor/phpunit/phpunit/src/Util/Test.php, line 691

Class

PHPUnit_Util_Test
Test helpers.

Code

public static function getTickets($className, $methodName) {
  $annotations = self::parseTestMethodAnnotations($className, $methodName);
  $tickets = array();
  if (isset($annotations['class']['ticket'])) {
    $tickets = $annotations['class']['ticket'];
  }
  if (isset($annotations['method']['ticket'])) {
    $tickets = array_merge($tickets, $annotations['method']['ticket']);
  }
  return array_unique($tickets);
}