PMCORE-3951
This commit is contained in:
@@ -50,7 +50,7 @@ class PMFNewUserTest extends TestCase
|
||||
public function it_should_test_the_pmfnewuser_function()
|
||||
{
|
||||
global $RBAC;
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
|
||||
@@ -706,7 +706,7 @@ class ReportTablesTest extends TestCase
|
||||
$proUid = $result->processUid;
|
||||
$grid = '';
|
||||
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first();
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->first();
|
||||
$appData = unserialize($app->APP_DATA);
|
||||
unset($appData['var_Textarea1']);
|
||||
$appData = serialize($appData);
|
||||
@@ -742,7 +742,7 @@ class ReportTablesTest extends TestCase
|
||||
$proUid = $result->processUid;
|
||||
$grid = '';
|
||||
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first();
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->first();
|
||||
$appData = unserialize($app->APP_DATA);
|
||||
$appData['var_Textarea1'] = [];
|
||||
$appData = serialize($appData);
|
||||
@@ -779,7 +779,7 @@ class ReportTablesTest extends TestCase
|
||||
$proUid = $result->processUid;
|
||||
$grid = 'var_Grid1';
|
||||
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first();
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->first();
|
||||
$appData = unserialize($app->APP_DATA);
|
||||
unset($appData['var_Grid1'][1]['var_Textarea1']);
|
||||
$appData = serialize($appData);
|
||||
@@ -897,7 +897,7 @@ class ReportTablesTest extends TestCase
|
||||
$proUid = $result->processUid;
|
||||
$grid = 'var_Grid1';
|
||||
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first();
|
||||
$app = Application::where('APP_UID', '=', $result->applicationUid)->first();
|
||||
$appData = unserialize($app->APP_DATA);
|
||||
$appData['var_Textarea1'] = [];
|
||||
$appData = serialize($appData);
|
||||
|
||||
@@ -1005,7 +1005,7 @@ class WsBaseTest extends TestCase
|
||||
{
|
||||
// Definition for avoid the error: Trying to get property 'aUserInfo' of non-object in the action buildAppDelayRow()
|
||||
global $RBAC;
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
@@ -1067,7 +1067,7 @@ class WsBaseTest extends TestCase
|
||||
{
|
||||
// Definition for avoid the error: Trying to get property 'aUserInfo' of non-object in the action buildAppDelayRow()
|
||||
global $RBAC;
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
|
||||
@@ -139,7 +139,6 @@ class AppNotesTest extends TestCase
|
||||
public function it_should_test_send_note_notification_without_user()
|
||||
{
|
||||
$user = User::where('USR_UID', '=', '00000000000000000000000000000001')
|
||||
->get()
|
||||
->first();
|
||||
$application = factory(Application::class)->create();
|
||||
$delegation = factory(Delegation::class)->create([
|
||||
@@ -159,7 +158,7 @@ class AppNotesTest extends TestCase
|
||||
$appNotes->sendNoteNotification(...$params);
|
||||
|
||||
//assert
|
||||
$appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->get()->first()->toArray();
|
||||
$appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->first()->toArray();
|
||||
$this->assertArrayHasKey('APP_UID', $appMessage);
|
||||
$this->assertEquals($appMessage['APP_UID'], $application->APP_UID);
|
||||
}
|
||||
@@ -172,7 +171,6 @@ class AppNotesTest extends TestCase
|
||||
public function it_should_test_send_note_notification_with_attach_files()
|
||||
{
|
||||
$user = User::where('USR_UID', '=', '00000000000000000000000000000001')
|
||||
->get()
|
||||
->first();
|
||||
$application = factory(Application::class)->create();
|
||||
$delegation = factory(Delegation::class)->create([
|
||||
@@ -200,7 +198,7 @@ class AppNotesTest extends TestCase
|
||||
$appNotes->sendNoteNotification(...$params);
|
||||
|
||||
//assert
|
||||
$appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->get()->first()->toArray();
|
||||
$appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->first()->toArray();
|
||||
$this->assertArrayHasKey('APP_UID', $appMessage);
|
||||
$this->assertEquals($appMessage['APP_UID'], $application->APP_UID);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class CasesMenuHighlightTest extends TestCase
|
||||
{
|
||||
global $RBAC;
|
||||
|
||||
$this->user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$this->user = User::where('USR_ID', '=', 1)->first();
|
||||
|
||||
$_SESSION['USER_LOGGED'] = $this->user['USR_UID'];
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class EmailServerTest extends TestCase
|
||||
private function loadUserSession()
|
||||
{
|
||||
global $RBAC;
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
|
||||
@@ -41,7 +41,7 @@ class CasesTraitTest extends TestCase
|
||||
*/
|
||||
private function prepareDerivationData()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user->USR_UID
|
||||
@@ -176,7 +176,7 @@ class CasesTraitTest extends TestCase
|
||||
$cases = new Cases();
|
||||
$cases->routeCase($processUid, $application, $postForm, $status, $flagGmail, $tasUid, $index, $userLogged);
|
||||
|
||||
$result = Delegation::where('APP_UID', '=', $application)->where('DEL_INDEX', '=', $index)->get()->first();
|
||||
$result = Delegation::where('APP_UID', '=', $application)->where('DEL_INDEX', '=', $index)->first();
|
||||
|
||||
$this->assertEquals('CLOSED', $result->DEL_THREAD_STATUS);
|
||||
}
|
||||
@@ -231,7 +231,7 @@ class CasesTraitTest extends TestCase
|
||||
$cases = new Cases();
|
||||
$cases->routeCase($processUid, $appUid, $postForm, $status, $flagGmail, $tasUid, $index, $userLogged);
|
||||
|
||||
$result = Delegation::where('APP_UID', '=', $appUid)->where('DEL_INDEX', '=', $index)->get()->first();
|
||||
$result = Delegation::where('APP_UID', '=', $appUid)->where('DEL_INDEX', '=', $index)->first();
|
||||
|
||||
$this->assertEquals('CLOSED', $result->DEL_THREAD_STATUS);
|
||||
}
|
||||
@@ -302,7 +302,7 @@ class CasesTraitTest extends TestCase
|
||||
*/
|
||||
public function it_should_verify_if_abe_is_completed()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user->USR_UID
|
||||
|
||||
@@ -147,7 +147,7 @@ class GmailOAuthTest extends TestCase
|
||||
public function it_should_create_email_server()
|
||||
{
|
||||
global $RBAC;
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
|
||||
@@ -42,7 +42,7 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_with_valid_credentials()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$oauthClients = factory(OauthClients::class)->create([
|
||||
"USR_UID" => $user->USR_UID
|
||||
]);
|
||||
@@ -80,7 +80,7 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_with_return_handle_token()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$user = User::where('USR_ID', '=', 1)->first();
|
||||
$oauthClients = factory(OauthClients::class)->create([
|
||||
"USR_UID" => $user->USR_UID
|
||||
]);
|
||||
@@ -116,7 +116,7 @@ class ServerTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_post_token_with_empty_client_id()
|
||||
{
|
||||
$user = User::where('USR_ID', '=', 1)->get()->first();
|
||||
$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",
|
||||
|
||||
Reference in New Issue
Block a user