You are here

public function PaymentReferenceTest::testFactory in Payment 8.2

@covers ::factory

File

modules/payment_reference/tests/src/Unit/PaymentReferenceTest.php, line 32

Class

PaymentReferenceTest
@coversDefaultClass \Drupal\payment_reference\PaymentReference

Namespace

Drupal\Tests\payment_reference\Unit

Code

public function testFactory() {
  $container = new Container();
  $factory = $this
    ->createMock(PaymentFactoryInterface::class);
  $container
    ->set('payment_reference.payment_factory', $factory);
  \Drupal::setContainer($container);
  $this
    ->assertSame($factory, PaymentReference::factory());
}