public static function PHPUnit_Framework_TestSuite::isTestMethod

Parameters

ReflectionMethod $method:

Return value

boolean

2 calls to PHPUnit_Framework_TestSuite::isTestMethod()
PHPUnit_Framework_TestSuite::addTestMethod in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php
PHPUnit_Framework_TestSuite::isPublicTestMethod in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php, line 874

Class

PHPUnit_Framework_TestSuite
A TestSuite is a composite of Tests. It runs a collection of test cases.

Code

public static function isTestMethod(ReflectionMethod $method) {
  if (strpos($method->name, 'test') === 0) {
    return TRUE;
  }

  // @scenario on TestCase::testMethod()
  // @test     on TestCase::testMethod()
  return strpos($method
    ->getDocComment(), '@test') !== FALSE || strpos($method
    ->getDocComment(), '@scenario') !== FALSE;
}