mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-02-21 20:56:08 +00:00

- File: '... /tests/unit/phpunit/include/MVC/SugarApplicationTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/SugarEmailAddress/SugarEmailAddressTest.php' - Replaced 6 occurrence(s) of 'new Contact()' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/SugarObjects/templates/PersonTest.php' - Replaced 1 occurrence(s) of 'new Contact()' - File: '... /tests/unit/phpunit/include/SugarFolders/SugarFolderTest.php' - Replaced 1 occurrence(s) of 'new Email()' - Replaced 17 occurrence(s) of 'new User()' - Replaced 1 occurrence(s) of 'new InboundEmail()' - File: '... /tests/unit/phpunit/include/TimeDateTest.php' - Replaced 6 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/utils/activityUtilsTest.php' - Replaced 1 occurrence(s) of 'new Meeting()' - Replaced 2 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/utils/LogicHookTest.php' - Replaced 2 occurrence(s) of 'new Account()' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/utils/securityUtilsTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/service/v4/SugarWebServiceUtilv4Test.php' - Replaced 1 occurrence(s) of 'new aCase()' - File: '... /tests/unit/phpunit/modules/Documents/DocumentTest.php' - Replaced 1 occurrence(s) of 'new User()' - Replaced 11 occurrence(s) of 'new Document()'
33 lines
944 B
PHP
33 lines
944 B
PHP
<?php
|
|
|
|
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
|
|
|
|
require_once 'include/utils/activity_utils.php';
|
|
|
|
class activity_utilsTest extends SuitePHPUnitFrameworkTestCase
|
|
{
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
|
|
global $current_user;
|
|
$current_user = BeanFactory::newBean('Users');
|
|
get_sugar_config_defaults();
|
|
}
|
|
|
|
public function testbuild_related_list_by_user_id()
|
|
{
|
|
//execute the method and test if it returns true
|
|
|
|
//with rel_users_table manually set
|
|
$bean = BeanFactory::newBean('Users');
|
|
$bean->rel_users_table = 'users_signatures';
|
|
$list = build_related_list_by_user_id($bean, '1', '');
|
|
$this->assertTrue(is_array($list));
|
|
|
|
//with rel_users_table set by default
|
|
$bean = BeanFactory::newBean('Meetings');
|
|
$list = build_related_list_by_user_id($bean, '1', '');
|
|
$this->assertTrue(is_array($list));
|
|
}
|
|
}
|