EntityExtraFieldInfoTest.php in Payment 8.2
File
modules/payment_form/tests/src/Unit/Hook/EntityExtraFieldInfoTest.php
View source
<?php
namespace Drupal\Tests\payment_form\Unit\Hook;
use Drupal\payment_form\Hook\EntityExtraFieldInfo;
use Drupal\Tests\UnitTestCase;
class EntityExtraFieldInfoTest extends UnitTestCase {
protected $stringTranslation;
protected $sut;
public function setUp() : void {
$this->stringTranslation = $this
->getStringTranslationStub();
$this->sut = new EntityExtraFieldInfo($this->stringTranslation);
}
public function testInvoke() {
$fields = $this->sut
->invoke();
$this
->assertIsArray($fields);
$this
->assertArrayHasKey('payment_method', $fields['payment']['payment_form']['form']);
}
}