PaymentPreExecuteTest.php in Payment 8.2
Namespace
Drupal\Tests\payment\Unit\EventFile
tests/src/Unit/Event/PaymentPreExecuteTest.phpView source
<?php
namespace Drupal\Tests\payment\Unit\Event;
use Drupal\payment\Entity\PaymentInterface;
use Drupal\payment\Event\PaymentPreExecute;
use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\payment\Event\PaymentPreExecute
*
* @group Payment
*/
class PaymentPreExecuteTest extends UnitTestCase {
/**
* The payment.
*
* @var \Drupal\payment\Entity\PaymentInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $payment;
/**
* The class under test.
*
* @var \Drupal\payment\Event\PaymentPreExecute
*/
protected $sut;
/**
* {@inheritdoc}
*/
public function setUp() : void {
$this->payment = $this
->createMock(PaymentInterface::class);
$this->sut = new PaymentPreExecute($this->payment);
}
/**
* @covers ::getPayment
*/
public function testGetPayment() {
$this
->assertSame($this->payment, $this->sut
->getPayment());
}
}
Classes
Name | Description |
---|---|
PaymentPreExecuteTest | @coversDefaultClass \Drupal\payment\Event\PaymentPreExecute |