mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-04 10:14:13 +08:00
Add additional configuration options to codeception
This updates the codeception unit tests to remove the LEGACY_PATH constant and to define legacy test runners so that we can test session related methods.
This commit is contained in:
parent
8cf555f4ee
commit
ece6ae6377
4 changed files with 32 additions and 20 deletions
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
../vendor/bin/phpunit
|
||||
../vendor/bin/codecept
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
<?php
|
||||
|
||||
if (!defined('LEGACY_PATH')) {
|
||||
define('LEGACY_PATH', dirname(__DIR__, 2) . '/legacy/');
|
||||
}
|
||||
error_reporting(E_ALL);
|
||||
|
||||
// Set up sugarEntry
|
||||
// Bootstrap composer
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
chdir(__DIR__ . '/../../legacy');
|
||||
|
||||
// Bootstrap SuiteCRM
|
||||
if (!defined('sugarEntry')) {
|
||||
define('sugarEntry', true);
|
||||
define('SUITE_PHPUNIT_RUNNER', true);
|
||||
}
|
||||
|
||||
// Set working directory for legacy
|
||||
chdir(LEGACY_PATH);
|
||||
|
||||
// Load in legacy
|
||||
require_once LEGACY_PATH . 'include/MVC/preDispatch.php';
|
||||
require_once LEGACY_PATH . 'include/entryPoint.php';
|
||||
require_once __DIR__ . '/../../legacy/include/utils.php';
|
||||
require_once __DIR__ . '/../../legacy/include/modules.php';
|
||||
require_once __DIR__ . '/../../legacy/include/MVC/preDispatch.php';
|
||||
require_once __DIR__ . '/../../legacy/include/entryPoint.php';
|
||||
|
|
|
@ -12,7 +12,7 @@ final class NavbarTest extends Unit
|
|||
*/
|
||||
private $navbar;
|
||||
|
||||
protected function setUp(): void
|
||||
protected function _before()
|
||||
{
|
||||
$this->navbar = new Navbar();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue