public function DatabaseSanitizeCase::setAutoloader in Database Sanitize 8
Work around to load EdisonLabs/MergeYaml library on test site.
This function needs to be called after setUpDrupal().
1 call to DatabaseSanitizeCase::setAutoloader()
- DatabaseSanitizeCase::setUp in drush/
tests/ DatabaseSanitizeTest.php - Setup the environment.
File
- drush/
tests/ DatabaseSanitizeTest.php, line 58
Class
- DatabaseSanitizeCase
- PHPUnit Tests for Database Sanitize.
Namespace
UnishCode
public function setAutoloader() {
$autoloader_real_path = $this->webRoot . '/vendor/composer/autoload_real.php';
$autoloader_real_content = file_get_contents($autoloader_real_path);
$autoloader_psr4_content = str_replace('<?php', '', file_get_contents(__DIR__ . '/assets/psr4-autoloader.php'));
$autoloader_real_content .= $autoloader_psr4_content;
file_put_contents($autoloader_real_path, $autoloader_real_content);
}