phpunit-autoload.php in Realistic Dummy Content 3.x
File
phpunit-autoload.php
View source
<?php
spl_autoload_register(function ($class) {
$custom_code = [
'realistic_dummy_content' => '.',
'realistic_dummy_content_api' => 'api',
];
require_once 'phpunit-bootstrap.php';
foreach ($custom_code as $namespace => $dir) {
if (substr($class, 0, strlen('Drupal\\' . $namespace . '\\')) == 'Drupal\\' . $namespace . '\\') {
$class2 = preg_replace('/^Drupal\\\\' . $namespace . '\\\\/', '', $class);
$path = $dir . '/src/' . str_replace('\\', '/', $class2) . '.php';
require_once $path;
}
}
});