Merged in bugfix/PMCORE-1641 (pull request #7393)

PMCORE-1641

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Andrea Adamczyk
2020-06-18 20:33:06 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 32 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace ProcessMaker\BusinessModel;
use ProcessMaker\BusinessModel\Lists;
use ProcessMaker\Model\User;
use Tests\TestCase;
/**
* Lists Tests
*/
class ListsTest extends TestCase
{
/**
* It tests the construct of the Lists class
*
* @covers \ProcessMaker\BusinessModel\Lists
* @test
*/
public function it_should_test_the_lists_construct()
{
$user = factory(User::class)->create();
$list = new Lists();
$res = $list->getList('inbox', ['userId' => $user->USR_UID]);
$this->assertEmpty($res['data']);
$this->assertEquals(0, $res['totalCount']);
}
}

View File

@@ -69,7 +69,8 @@ class Lists
];
// If the feature for highlight the home folders is disabled, add self-service list to the map
if (!HIGHLIGHT_HOME_FOLDER_ENABLE) {
$flag = defined('HIGHLIGHT_HOME_FOLDER_ENABLE') ? HIGHLIGHT_HOME_FOLDER_ENABLE : 0;
if (!$flag) {
$this->mapList['ListSelfService'] = 'CASES_SELFSERVICE';
}