You are here

public function RngScheduledRuleTest::testRuleScheduleCreated in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/RngScheduledRuleTest.php \Drupal\Tests\rng\Kernel\RngScheduledRuleTest::testRuleScheduleCreated()
  2. 3.x tests/src/Kernel/RngScheduledRuleTest.php \Drupal\Tests\rng\Kernel\RngScheduledRuleTest::testRuleScheduleCreated()

Test rule scheduler entity created for an active rule.

File

tests/src/Kernel/RngScheduledRuleTest.php, line 107

Class

RngScheduledRuleTest
Scheduled rule entity is synced with parent rule status.

Namespace

Drupal\Tests\rng\Kernel

Code

public function testRuleScheduleCreated() {
  $this->rule
    ->setIsActive(TRUE)
    ->addComponent($this->condition)
    ->save();
  $this
    ->assertEquals(1, count(RuleSchedule::loadMultiple()));
}