public static function PHPUnit_Util_Test::getSize

Returns the size of the test.

@since Method available since Release 3.6.0

Parameters

string $className:

string $methodName:

Return value

integer

2 calls to PHPUnit_Util_Test::getSize()
PHPUnit_Framework_TestCase::getSize in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php
Returns the size of the test.
PHPUnit_Framework_TestResult::endTest in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php
Informs the result that a test was completed.

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php, line 462

Class

PHPUnit_Util_Test
Test helpers.

Code

public static function getSize($className, $methodName) {
  $groups = array_flip(self::getGroups($className, $methodName));
  $size = self::SMALL;
  $class = new ReflectionClass($className);
  if (class_exists('PHPUnit_Extensions_Database_TestCase', FALSE) && $class
    ->isSubclassOf('PHPUnit_Extensions_Database_TestCase') || class_exists('PHPUnit_Extensions_SeleniumTestCase', FALSE) && $class
    ->isSubclassOf('PHPUnit_Extensions_SeleniumTestCase')) {
    $size = self::LARGE;
  }
  else {
    if (isset($groups['medium'])) {
      $size = self::MEDIUM;
    }
    else {
      if (isset($groups['large'])) {
        $size = self::LARGE;
      }
    }
  }
  return $size;
}