You are here

public function CurrencyEventsTest::testEventNames in Currency 8.3

Tests constants with event names.

File

tests/src/Unit/Event/CurrencyEventsTest.php, line 18

Class

CurrencyEventsTest
@coversDefaultClass \Drupal\currency\Event\CurrencyEvents

Namespace

Drupal\Tests\currency\Unit\Event

Code

public function testEventNames() {
  $class = new \ReflectionClass(CurrencyEvents::class);
  foreach ($class
    ->getConstants() as $event_name) {

    // Make sure that every event name is properly namespaced.
    $this
      ->assertSame(0, strpos($event_name, 'drupal.currency.'));
  }
}