You are here

public function PHPUnit_Framework_TestSuite::addTestFiles in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/TestSuite.php \PHPUnit_Framework_TestSuite::addTestFiles()

Wrapper for addTestFile() that adds multiple test files.

@since Method available since Release 2.3.0

Parameters

array|Iterator $filenames:

Throws

PHPUnit_Framework_Exception

File

vendor/phpunit/phpunit/src/Framework/TestSuite.php, line 392

Class

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

Code

public function addTestFiles($filenames) {
  if (!(is_array($filenames) || is_object($filenames) && $filenames instanceof Iterator)) {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'array or iterator');
  }
  foreach ($filenames as $filename) {
    $this
      ->addTestFile((string) $filename);
  }
}