You are here

public function OrderReportTest::testFields in Commerce Reporting 8

Tests and asserts bundle fields present.

File

tests/src/Kernel/ReportType/OrderReportTest.php, line 62

Class

OrderReportTest
Tests the `commerce_order_report` entity.

Namespace

Drupal\Tests\commerce_reports\Kernel\ReportType

Code

public function testFields() {
  $order_report = OrderReport::create([
    'type' => 'order_report',
  ]);
  $this
    ->assertTrue($order_report
    ->hasField('order_type_id'));
  $this
    ->assertTrue($order_report
    ->hasField('amount'));
  $this
    ->assertTrue($order_report
    ->hasField('mail'));
  $this
    ->assertTrue($order_report
    ->hasField('billing_address'));
}