mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2026-07-27 23:29:19 +08:00
Merge commit 'de4bf25cb3' into release/8.4.0-beta
# Conflicts:
# public/legacy/data/SugarBean.php
# public/legacy/include/Smarty/plugins/function.sugarvar.php
# public/legacy/include/SugarDateTime.php
# public/legacy/include/database/MysqliManager.php
# public/legacy/modules/Alerts/metadata/listviewdefs.php
# public/legacy/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php
# public/legacy/modules/Trackers/metadata/SearchFields.php
# public/legacy/modules/Trackers/metadata/listviewdefs.php
# public/legacy/modules/UpgradeWizard/SugarMerge/EditViewMerge.php
# public/legacy/suitecrm_version.php
65 lines
1.4 KiB
PHP
65 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Test\Api\V8;
|
|
|
|
use ApiTester;
|
|
use ArrayIterator;
|
|
use Codeception\Example;
|
|
use Codeception\Exception\ModuleException;
|
|
use Exception;
|
|
|
|
#[\AllowDynamicProperties]
|
|
class GetModulesMetaCest
|
|
{
|
|
/**
|
|
* @param ApiTester $I
|
|
*
|
|
* @throws ModuleException
|
|
*/
|
|
public function _before(ApiTester $I)
|
|
{
|
|
$I->login();
|
|
}
|
|
|
|
/**
|
|
* @param ApiTester $I
|
|
* @param Example $example
|
|
*
|
|
* @dataProvider shouldWorkDataProvider
|
|
* @throws Exception
|
|
*/
|
|
public function shouldWork(ApiTester $I, Example $example)
|
|
{
|
|
/** @var ArrayIterator $iterator */
|
|
$iterator = $example->getIterator();
|
|
|
|
$I->sendGET($I->getInstanceURL() . $iterator->offsetGet('endPoint'));
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson(['type' => 'modules']);
|
|
$I->seeResponseContainsJson(
|
|
[
|
|
'data' =>
|
|
[
|
|
'Accounts' => [
|
|
'label' => 'Accounts',
|
|
'access' => ['access']
|
|
],
|
|
],
|
|
]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function shouldWorkDataProvider()
|
|
{
|
|
return [
|
|
[
|
|
'shouldWork01' => 'returnsModules',
|
|
'endPoint' => '/Api/V8/meta/modules',
|
|
],
|
|
];
|
|
}
|
|
}
|