public function InvoiceTypeTest::testInvoiceTypeDependencies in Commerce Invoice 8.2
Tests invoice type dependencies.
File
- tests/
src/ FunctionalJavascript/ InvoiceTypeTest.php, line 112
Class
- InvoiceTypeTest
- Tests the invoice type UI.
Namespace
Drupal\Tests\commerce_invoice\FunctionalJavascriptCode
public function testInvoiceTypeDependencies() {
$this
->drupalGet('admin/commerce/config/invoice-types/default/edit');
$this
->submitForm([
'workflow' => 'invoice_test_workflow',
], t('Save'));
$invoice_type = InvoiceType::load('default');
$this
->assertEquals('invoice_test_workflow', $invoice_type
->getWorkflowId());
$dependencies = $invoice_type
->getDependencies();
$this
->assertArrayHasKey('module', $dependencies);
$this
->assertContains('commerce_invoice_test', $dependencies['module']);
}