Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
BaseTest.php
1
<?php
2
3
namespace
Bitrix\Catalog\v2\Tests
;
4
5
use
Bitrix\Catalog\v2\IoC\ContainerBuilder
;
6
use
Bitrix\Catalog\v2\IoC\ContainerContract
;
7
use
Bitrix\Main\Loader
;
8
use PHPUnit\Framework\TestCase;
9
10
abstract
class
BaseTest
extends
TestCase
11
{
13
protected
static
$container
;
14
15
public
static
function
loadContainer
():
ContainerContract
16
{
17
if
(static::$container ===
null
)
18
{
19
static::$container =
ContainerBuilder::buildFromConfig
(__DIR__ .
'/.test.container.php'
);
20
}
21
22
return
static::$container;
23
}
24
25
public
static
function
setUpBeforeClass
() : void
26
{
27
Loader::includeModule(
'catalog'
);
28
static::loadContainer();
29
}
30
}
Bitrix\Catalog\v2\IoC\ContainerBuilder
Definition
ContainerBuilder.php:18
Bitrix\Catalog\v2\IoC\ContainerBuilder\buildFromConfig
static buildFromConfig(string $customPath=null)
Definition
ContainerBuilder.php:100
Bitrix\Catalog\v2\Tests\BaseTest
Definition
BaseTest.php:11
Bitrix\Catalog\v2\Tests\BaseTest\setUpBeforeClass
static setUpBeforeClass()
Definition
BaseTest.php:25
Bitrix\Catalog\v2\Tests\BaseTest\$container
static $container
Definition
BaseTest.php:13
Bitrix\Catalog\v2\Tests\BaseTest\loadContainer
static loadContainer()
Definition
BaseTest.php:15
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Catalog\v2\IoC\ContainerContract
Definition
ContainerContract.php:15
Bitrix\Catalog\v2\Tests
Definition
BaseTest.php:3
modules
catalog
lib
v2
Tests
BaseTest.php
Создано системой
1.10.0