PMCORE-1034 ProcessMaker is not running in Stack 270
This commit is contained in:
@@ -944,7 +944,7 @@ class Bootstrap
|
||||
}
|
||||
|
||||
//Remove comments..
|
||||
$regex = array("`^([\t\s]+)`ism" => '', "`^\/\*(.+?)\*\/`ism" => "", "`([\n\A;]+)\/\*(.+?)\*\/`ism" => "$1", "`([\n\A;\s]+)//(.+?)[\n\r]`ism" => "$1\n", "`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n");
|
||||
$regex = array("`^([\t\s]+)`ism" => '', "`^\/\*(.+?)\*\/`ism" => "", "`([\n;]+)\/\*(.+?)\*\/`ism" => "$1", "`([\n;\s]+)//(.+?)[\n\r]`ism" => "$1\n", "`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n");
|
||||
$output = preg_replace(array_keys($regex), $regex, $output);
|
||||
$output = $outputHeader . $output;
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ define("PATH_DYNAFORM", PATH_DATA_SITE . "xmlForms/");
|
||||
define("PATH_DATA_MAILTEMPLATES", PATH_DATA_SITE . "mailTemplates/");
|
||||
define("PATH_DATA_PUBLIC", PATH_DATA_SITE . "public/");
|
||||
define("PATH_CONTROLLERS", PATH_CORE . "controllers" . PATH_SEP);
|
||||
define("PATH_SKIN_ENGINE", PATH_CORE . "skinEngine" . PATH_SEP);
|
||||
G::defineConstants();
|
||||
|
||||
/**
|
||||
|
||||
65
tests/unit/gulliver/system/BootstrapTest.php
Normal file
65
tests/unit/gulliver/system/BootstrapTest.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\gulliver\system;
|
||||
|
||||
use Bootstrap;
|
||||
use Faker\Factory;
|
||||
use Tests\TestCase;
|
||||
|
||||
class BootstrapTest extends TestCase
|
||||
{
|
||||
private $faker;
|
||||
|
||||
/**
|
||||
* Set up method.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->faker = Factory::create();
|
||||
}
|
||||
|
||||
/**
|
||||
* This tests if the content of the css files is being generated correctly.
|
||||
* @test
|
||||
* @covers \Bootstrap::streamCSSBigFile()
|
||||
*/
|
||||
public function it_should_test_the_generation_of_css_files()
|
||||
{
|
||||
$userAgent = $this->faker->userAgent;
|
||||
$_SERVER ['HTTP_USER_AGENT'] = $userAgent;
|
||||
$filename = "neoclassic";
|
||||
$result = Bootstrap::streamCSSBigFile($filename);
|
||||
|
||||
//add more assertions
|
||||
$this->assertRegexp("/{$filename}/", $result);
|
||||
$this->assertRegexp("/font-face/", $result);
|
||||
$this->assertRegexp("/font-family/", $result);
|
||||
|
||||
$filename = "jscolors";
|
||||
$result = Bootstrap::streamCSSBigFile($filename);
|
||||
|
||||
//add more assertions
|
||||
$this->assertRegexp("/{$filename}/", $result);
|
||||
|
||||
$filename = "xmlcolors";
|
||||
$result = Bootstrap::streamCSSBigFile($filename);
|
||||
|
||||
//add more assertions
|
||||
$this->assertRegexp("/{$filename}/", $result);
|
||||
|
||||
$filename = "classic";
|
||||
$result = Bootstrap::streamCSSBigFile($filename);
|
||||
|
||||
//add more assertions
|
||||
$this->assertRegexp("/{$filename}/", $result);
|
||||
$this->assertRegexp("/font-family/", $result);
|
||||
$this->assertRegexp("/ss_group_suit/", $result);
|
||||
|
||||
$filename = "classic-extjs";
|
||||
$result = Bootstrap::streamCSSBigFile($filename);
|
||||
|
||||
//add more assertions
|
||||
$this->assertRegexp("/{$filename}/", $result);
|
||||
}
|
||||
}
|
||||
@@ -296,12 +296,14 @@ if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
|
||||
$config['safari_cookie_lifetime'] == 1)) {
|
||||
ini_set('session.cookie_lifetime', $timelife);
|
||||
}
|
||||
session_start();
|
||||
|
||||
if (!(array_key_exists('REMOTE_USER', $_SERVER) && (string)($_SERVER['REMOTE_USER']) != '')) {
|
||||
if (!(array_key_exists('REMOTE_USER', $_SERVER) && (string) ($_SERVER['REMOTE_USER']) != '')) {
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.cookie_secure', 1);
|
||||
if (G::is_https()) {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
}
|
||||
session_start();
|
||||
|
||||
//Set Time Zone
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user