function RulesConditionContainerTest::getMockConditionContainer

Creates a mocked condition container.

Parameters

array $methods: The methods to mock.

string $class: The name of the created mock class.

Return value

\Drupal\rules\Engine\ConditionExpressionContainerInterface The mocked condition container.

1 call to RulesConditionContainerTest::getMockConditionContainer()
RulesConditionContainerTest::testAddExpressionObject in tests/src/Unit/RulesConditionContainerTest.php
Tests adding conditions to the condition container.

File

tests/src/Unit/RulesConditionContainerTest.php, line 27

Class

RulesConditionContainerTest
@coversDefaultClass \Drupal\rules\Engine\ConditionExpressionContainer @group Rules

Namespace

Drupal\Tests\rules\Unit

Code

protected function getMockConditionContainer(array $methods = [], $class = 'RulesConditionContainerMock') {
    return $this->getMockForAbstractClass(ConditionExpressionContainer::class, [
        [],
        'test_id',
        [],
        $this->prophesize(ExpressionManagerInterface::class)
            ->reveal(),
        $this->prophesize(LoggerChannelInterface::class)
            ->reveal(),
    ], $class, TRUE, TRUE, TRUE, $methods);
}