public function __construct($testTypes = [])
{
if (!is_array($testTypes) && !empty($testTypes)) {
throw new \Exception(__METHOD__ . ": Invalid test types variable passed.");
} elseif (!empty($testTypes)) {
$testTypes = array_flip($testTypes);
$this->testTypes = array_intersect_key($testTypes, $this->testTypes);
}
foreach ($this->testTypes as $testType => $className) {
$className = $this->getTestClassName($testType);
$this->testTypes[$testType] = new $className();
$this->registerTests($testType, $this->testTypes[$testType]->getTests());
}
}