Answer the question
In order to leave comments, you need to log in
How to conduct unit tests in 1s bitrix using codeception?
How to make codeception and 1c bitrix friends? In the __before method I include files
require_once $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php';
Answer the question
In order to leave comments, you need to log in
Problem solved. If suddenly someone has a similar
$level = ob_get_level();
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php';
while (ob_get_level() > $level) {
ob_end_clean();
}
I got up on the same problem, but no errors are given, it just doesn’t reach the tests
After "Running with seeds:" there should be messages about passing the tests, but, as you can see on the screenshot, it doesn’t get to that and the command execution just stops
Connecting prologue in a separate file:
<?php
$_SERVER['DOCUMENT_ROOT'] = realpath(__DIR__.'/..');
$DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
define('BX_NO_ACCELERATOR_RESET', true);
define("CHK_EVENT", true);
define('SITE_ID', 's1');
$level = ob_get_level();
require_once $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php';
while (ob_get_level() > $level) {
ob_end_clean();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question