public function IntegrityCheckTest::testIntegrityCheck in Rules 8.3
Tests that the integrity check can be invoked.
File
- tests/
src/ Unit/ Integration/ Engine/ IntegrityCheckTest.php, line 21
Class
- IntegrityCheckTest
- Test the integrity check functionality during configuration time.
Namespace
Drupal\Tests\rules\Unit\Integration\EngineCode
public function testIntegrityCheck() {
$rule = $this->rulesExpressionManager
->createRule();
$rule
->addAction('rules_entity_save', ContextConfig::create()
->map('entity', 'entity'));
$violation_list = RulesComponent::create($rule)
->addContextDefinition('entity', ContextDefinition::create('entity'))
->checkIntegrity();
$this
->assertEquals(0, iterator_count($violation_list));
}