Merged in bugfix/PMCORE-3971 (pull request #8565)
PMCORE-3971 (remove conflicts with develop branch) 3.8.x: Solve the conflicts to merge this epic into develop Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
4081
composer.lock
generated
4081
composer.lock
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,46 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Model factory for web entries
|
||||
*/
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Factories\Factory;
|
||||
use G;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class WebEntryFactory extends Factory
|
||||
{
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'WE_UID' => G::generateUniqueID(),
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'TAS_UID' => G::generateUniqueID(),
|
||||
'DYN_UID' => G::generateUniqueID(),
|
||||
'USR_UID' => G::generateUniqueID(),
|
||||
'WE_METHOD' => $this->faker->randomElement(['WS', 'HTML']),
|
||||
'WE_INPUT_DOCUMENT_ACCESS' => $this->faker->randomElement([0, 1]),
|
||||
'WE_DATA' => G::generateUniqueID() . '.php',
|
||||
'WE_CREATE_USR_UID' => G::generateUniqueID(),
|
||||
'WE_UPDATE_USR_UID' => G::generateUniqueID(),
|
||||
'WE_CREATE_DATE' => $this->faker->date('Y-m-d H:i:s', 'now'),
|
||||
'WE_UPDATE_DATE' => $this->faker->date('Y-m-d H:i:s', 'now'),
|
||||
'WE_TYPE' => $this->faker->randomElement(['SINGLE', 'MULTIPLE']),
|
||||
'WE_CUSTOM_TITLE' => $this->faker->words(5, true),
|
||||
'WE_AUTHENTICATION' => $this->faker->randomElement(['LOGIN_REQUIRED', 'ANONYMOUS']),
|
||||
'WE_HIDE_INFORMATION_BAR' => $this->faker->randomElement(['0', '1']),
|
||||
'WE_CALLBACK' => $this->faker->randomElement(['PROCESSMAKER', 'CUSTOM', 'CUSTOM_CLEAR']),
|
||||
'WE_CALLBACK_URL' => $this->faker->url,
|
||||
'WE_LINK_GENERATION' => $this->faker->randomElement(['DEFAULT', 'ADVANCED']),
|
||||
'WE_LINK_SKIN' => 'classic',
|
||||
'WE_LINK_LANGUAGE' => 'en',
|
||||
'WE_LINK_DOMAIN' => $this->faker->domainName,
|
||||
'WE_SHOW_IN_NEW_CASE' => $this->faker->randomElement(['0', '1'])
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
$factory->define(\ProcessMaker\Model\WebEntry::class, function(Faker $faker) {
|
||||
return [
|
||||
'WE_UID' => G::generateUniqueID(),
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'TAS_UID' => G::generateUniqueID(),
|
||||
'DYN_UID' => G::generateUniqueID(),
|
||||
'USR_UID' => G::generateUniqueID(),
|
||||
'WE_METHOD' => $faker->randomElement(['WS', 'HTML']),
|
||||
'WE_INPUT_DOCUMENT_ACCESS' => $faker->randomElement([0, 1]),
|
||||
'WE_DATA' => G::generateUniqueID() . '.php',
|
||||
'WE_CREATE_USR_UID' => G::generateUniqueID(),
|
||||
'WE_UPDATE_USR_UID' => G::generateUniqueID(),
|
||||
'WE_CREATE_DATE' => $faker->date('Y-m-d H:i:s', 'now'),
|
||||
'WE_UPDATE_DATE' => $faker->date('Y-m-d H:i:s', 'now'),
|
||||
'WE_TYPE' => $faker->randomElement(['SINGLE', 'MULTIPLE']),
|
||||
'WE_CUSTOM_TITLE' => $faker->words(5, true),
|
||||
'WE_AUTHENTICATION' => $faker->randomElement(['LOGIN_REQUIRED', 'ANONYMOUS']),
|
||||
'WE_HIDE_INFORMATION_BAR' => $faker->randomElement(['0', '1']),
|
||||
'WE_HIDE_ACTIVE_SESSION_WARNING' => $faker->randomElement(['0', '1']),
|
||||
'WE_CALLBACK' => $faker->randomElement(['PROCESSMAKER', 'CUSTOM', 'CUSTOM_CLEAR']),
|
||||
'WE_CALLBACK_URL' => $faker->url,
|
||||
'WE_LINK_GENERATION' => $faker->randomElement(['DEFAULT', 'ADVANCED']),
|
||||
'WE_LINK_SKIN' => 'classic',
|
||||
'WE_LINK_LANGUAGE' => 'en',
|
||||
'WE_LINK_DOMAIN' => $faker->domainName,
|
||||
'WE_SHOW_IN_NEW_CASE' => $faker->randomElement(['0', '1'])
|
||||
];
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ class ServerTest extends TestCase
|
||||
/**
|
||||
* Setup method.
|
||||
*/
|
||||
public function setUp(): void
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->server = $_SERVER;
|
||||
@@ -29,7 +29,7 @@ class ServerTest extends TestCase
|
||||
/**
|
||||
* Teardown method.
|
||||
*/
|
||||
public function tearDown(): void
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
$_SERVER = $this->server;
|
||||
@@ -42,8 +42,8 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_with_valid_credentials()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$oauthClients = OauthClients::factory()->create([
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$oauthClients = factory(OauthClients::class)->create([
|
||||
"USR_UID" => $user->USR_UID
|
||||
]);
|
||||
|
||||
@@ -80,8 +80,8 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_with_return_handle_token()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$oauthClients = OauthClients::factory()->create([
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$oauthClients = factory(OauthClients::class)->create([
|
||||
"USR_UID" => $user->USR_UID
|
||||
]);
|
||||
|
||||
@@ -116,8 +116,8 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_with_empty_client_id()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$oauthClients = OauthClients::factory()->create([
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$oauthClients = factory(OauthClients::class)->create([
|
||||
"USR_UID" => $user->USR_UID
|
||||
]);
|
||||
|
||||
@@ -155,8 +155,8 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_for_pm_client_id()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$oauthClients = OauthClients::where('CLIENT_ID', '=', 'x-pm-local-client')->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$oauthClients = OauthClients::where('CLIENT_ID', '=', 'x-pm-local-client')->first();
|
||||
|
||||
$data = '{
|
||||
"grant_type":"password",
|
||||
@@ -202,7 +202,7 @@ class ServerTest extends TestCase
|
||||
file_put_contents($filename, $data);
|
||||
|
||||
LicenseManager::truncate();
|
||||
LicenseManager::factory()->create([
|
||||
factory(LicenseManager::class)->create([
|
||||
"LICENSE_DATA" => $data,
|
||||
"LICENSE_PATH" => $filename,
|
||||
"LICENSE_WORKSPACE" => env('MAIN_SYS_SYS')
|
||||
|
||||
13
thirdparty/phing/lib/Capsule.php
vendored
13
thirdparty/phing/lib/Capsule.php
vendored
@@ -139,15 +139,16 @@ class Capsule {
|
||||
$iniSet($inclDir, $path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ini_set('track_errors', true);
|
||||
include $__template;
|
||||
@ini_restore('track_errors');
|
||||
|
||||
// restore the include path
|
||||
ini_set('include_path', $__old_inc_path);
|
||||
|
||||
$lastError = error_get_last();
|
||||
if (!empty($lastError['message'])) {
|
||||
throw new Exception("Unable to parse template " . $__template . ": " . $lastError['message']);
|
||||
if (!empty($php_errormsg)) {
|
||||
throw new Exception("Unable to parse template " . $__template . ": " . $php_errormsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,9 +200,9 @@ class Capsule {
|
||||
* @return string "Best guess" path for this file.
|
||||
*/
|
||||
protected function resolvePath($file, $basepath) {
|
||||
if ( !($file[0] == DIRECTORY_SEPARATOR || $file[0] == '/')
|
||||
if ( !($file[0] == DIRECTORY_SEPARATOR || $file[0] == '/')
|
||||
// also account for C:\ style path
|
||||
&& !($file[1] == ':' && ($file[2] == DIRECTORY_SEPARATOR || $file[2] == '/'))) {
|
||||
&& !($file[1] == ':' && ($file[2] == DIRECTORY_SEPARATOR || $file[2] == '/'))) {
|
||||
if ($basepath != null) {
|
||||
$file = $basepath . DIRECTORY_SEPARATOR . $file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user