public function RngScheduledRuleTest::testRuleScheduleNotCreated in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngScheduledRuleTest.php \Drupal\Tests\rng\Kernel\RngScheduledRuleTest::testRuleScheduleNotCreated()
- 3.x tests/src/Kernel/RngScheduledRuleTest.php \Drupal\Tests\rng\Kernel\RngScheduledRuleTest::testRuleScheduleNotCreated()
Test rule scheduler entity not created for an inactive rule.
File
- tests/
src/ Kernel/ RngScheduledRuleTest.php, line 118
Class
- RngScheduledRuleTest
- Scheduled rule entity is synced with parent rule status.
Namespace
Drupal\Tests\rng\KernelCode
public function testRuleScheduleNotCreated() {
$this->rule
->setIsActive(FALSE)
->addComponent($this->condition)
->save();
$this
->assertEquals(0, count(RuleSchedule::loadMultiple()));
}