function HtmlOutputLogger::init
Initializes the extension.
Parameters
string $outputDirectory: The directory where the HTML pages should be generated.
bool $outputVerbose: If TRUE, a list of links generated will be output at the end of the test run; if FALSE, only a summary with the count of pages generated.
Throws
\PHPUnit\Event\EventFacadeIsSealedException
\PHPUnit\Util\Exception
\PHPUnit\Event\UnknownSubscriberTypeException
\RuntimeException
1 call to HtmlOutputLogger::init()
- bootstrap.php in core/
tests/ bootstrap.php - Autoloader for Drupal PHPUnit testing.
File
-
core/
tests/ Drupal/ TestTools/ Extension/ HtmlLogging/ HtmlOutputLogger.php, line 57
Class
- HtmlOutputLogger
- Drupal's extension for providing HTML output results for functional tests.
Namespace
Drupal\TestTools\Extension\HtmlLoggingCode
public static function init(string $outputDirectory, bool $outputVerbose) : void {
if (self::$instance === NULL) {
$realDirectory = realpath($outputDirectory);
if ($realDirectory === FALSE || !is_dir($realDirectory) || !is_writable($realDirectory)) {
print "HTML output directory {$outputDirectory} is not a writable directory.\n\n";
return;
}
self::$instance = new self($realDirectory, $outputVerbose, Facade::instance());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.