You are here

public function PaymentTypeManagerTest::testGetDefinitions in Payment 8.2

@covers ::getDefinitions

File

tests/src/Unit/Plugin/Payment/Type/PaymentTypeManagerTest.php, line 91

Class

PaymentTypeManagerTest
@coversDefaultClass \Drupal\payment\Plugin\Payment\Type\PaymentTypeManager

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\Type

Code

public function testGetDefinitions() {
  $definitions = array(
    'foo' => array(
      'label' => $this
        ->randomMachineName(),
    ),
  );
  $this->discovery
    ->expects($this
    ->once())
    ->method('getDefinitions')
    ->willReturn($definitions);
  $this->moduleHandler
    ->expects($this
    ->once())
    ->method('alter')
    ->with('payment_type');
  $this
    ->assertSame($definitions, $this->sut
    ->getDefinitions());
}