function ReactionRuleConfigTest::testGetEvents
@covers ::getEvents
      
    
File
- 
              tests/src/ Unit/ Entity/ ReactionRuleConfigTest.php, line 31 
Class
- ReactionRuleConfigTest
- @coversDefaultClass \Drupal\rules\Entity\ReactionRuleConfig[[api-linebreak]] @group Rules
Namespace
Drupal\Tests\rules\Unit\EntityCode
public function testGetEvents() {
  // Create a rule with a few events.
  $rule = $this->createRule([
    'events' => [
      [
        'event_name' => 'foo',
      ],
      [
        'event_name' => 'bar',
        'configuration' => [
          'qux' => 'baz',
        ],
      ],
    ],
  ]);
  $expected = [
    [
      'event_name' => 'foo',
    ],
    [
      'event_name' => 'bar',
      'configuration' => [
        'qux' => 'baz',
      ],
    ],
  ];
  $this->assertSame($expected, $rule->getEvents());
}