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\UnitCode
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());
}