PMCORE-1203 Help on how batch routing feature works and help to debug the code with a client

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-03-20 11:26:49 -04:00
parent 67df02497f
commit 2fdcc30aad
15 changed files with 771 additions and 356 deletions

34
tests/CreateTestSite.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
namespace Tests;
trait CreateTestSite
{
public function createDBFile(string $workspace)
{
if (!file_exists(PATH_DB . $workspace)) {
mkdir(PATH_DB . $workspace);
}
if (!file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
$myfile = fopen(PATH_DB . $workspace . PATH_SEP . "db.php", "w");
$content = ""
. "<?php\n"
. "define ('DB_ADAPTER', 'mysql' );\n"
. "define ('DB_HOST', '" . env('DB_HOST') . "' );\n"
. "define ('DB_NAME', '" . env('DB_DATABASE') . "' );\n"
. "define ('DB_USER', '" . env('DB_USERNAME') . "' );\n"
. "define ('DB_PASS', '" . env('DB_PASSWORD') . "' );\n"
. "define ('DB_RBAC_HOST', '" . env('DB_HOST') . "' );\n"
. "define ('DB_RBAC_NAME', '" . env('DB_DATABASE') . "' );\n"
. "define ('DB_RBAC_USER', '" . env('DB_USERNAME') . "' );\n"
. "define ('DB_RBAC_PASS', '" . env('DB_PASSWORD') . "' );\n"
. "define ('DB_REPORT_HOST', '" . env('DB_HOST') . "' );\n"
. "define ('DB_REPORT_NAME', '" . env('DB_DATABASE') . "' );\n"
. "define ('DB_REPORT_USER', '" . env('DB_USERNAME') . "' );\n"
. "define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );\n";
fwrite($myfile, $content);
}
}
}