public function RngScheduledRuleTest::testRuleScheduleCreated in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngScheduledRuleTest.php \Drupal\Tests\rng\Kernel\RngScheduledRuleTest::testRuleScheduleCreated()
- 8 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\KernelCode
public function testRuleScheduleCreated() {
$this->rule
->setIsActive(TRUE)
->addComponent($this->condition)
->save();
$this
->assertEquals(1, count(RuleSchedule::loadMultiple()));
}