You are here

public function PaymentTest::testTypeManager in Payment 8.2

@covers ::typeManager

File

tests/src/Unit/PaymentTest.php, line 80

Class

PaymentTest
@coversDefaultClass \Drupal\payment\Payment

Namespace

Drupal\Tests\payment\Unit

Code

public function testTypeManager() {
  $container = new Container();
  $type_manager = $this
    ->createMock(PaymentTypeManagerInterface::class);
  $container
    ->set('plugin.manager.payment.type', $type_manager);
  \Drupal::setContainer($container);
  $this
    ->assertSame($type_manager, Payment::typeManager());
}