You are here

public function PHPUnit_Extensions_PhptTestCase::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php \PHPUnit_Extensions_PhptTestCase::__construct()

Constructs a test case with the given filename.

Parameters

string $filename:

Throws

PHPUnit_Framework_Exception

File

vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php, line 56

Class

PHPUnit_Extensions_PhptTestCase
Runner for PHPT test cases.

Code

public function __construct($filename) {
  if (!is_string($filename)) {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
  }
  if (!is_file($filename)) {
    throw new PHPUnit_Framework_Exception(sprintf('File "%s" does not exist.', $filename));
  }
  $this->filename = $filename;
}